JSPM

  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q49281F
  • License MIT

Utility to serve Marko build a server from a template

Package Exports

  • @marko/build

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@marko/build) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


@marko/build
API Stability NPM Version Downloads

Utility to build a node server from a marko file

CLI

Installation

npm install marko-cli

Example

marko build .
marko build ./my-page.marko

Options

  • --output -o: Where to write the build.

API

Installation

npm install @marko/build

Example

import build from "@marko/build";

build({
  file: "./component.marko"
}).run(() => {
  console.log("Build complete");
});

The object returned from the build function is a webpack compiler instance.

Options

  • file - the marko file to build
  • output - where to write the build
  • serverPlugins - additional webpack plugins to run on the server build
  • clientPlugins - additional webpack plugins to run on the client build
  • production - whether to build in production mode