@marko/build
Utility to build a node server from a marko file
CLI
Getting Started
npm install @marko/build
marko-build .
or
npx @marko/build .
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 buildoutput
- where to write the buildserverPlugins
- additional webpack plugins to run on the server buildclientPlugins
- additional webpack plugins to run on the client buildproduction
- whether to build in production mode