4.1.2 • Published 4 years ago

@marko/compile v4.1.2

Weekly downloads
156
License
MIT
Repository
github
Last release
4 years ago

Utility to compile Marko templates to JavaScript.

CLI

Getting Started

npm install @marko/compile
marko-compile template.marko

or

npx @marko/compile template.marko

Example

marko-compile --server ./components/my-component.marko
marko-compile --browser ./components/my-component.marko

Options

  • --server: Compiles a Marko file to render html.
  • --browser: Compiles a Marko file to render vdom.
  • --files --file -f *: Provide a pattern to match marko file(s).
  • --ignore: Provide a pattern to exclude files from being compiled.
  • --clean: Deletes any compiled .marko.js files.

API

Installation

npm install @marko/compile

Example

import compile from "@marko/compile";

compile({
  files: "./components/**/*.marko"
}).then(() => {
  // All files are written to disk.
  console.log("Compiled all files");
});

Options

Options are the same as the CLI options.

4.1.2

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.4.0

5 years ago

3.3.2

5 years ago

3.3.1

5 years ago

3.3.0

5 years ago

3.2.1

5 years ago

3.2.0

6 years ago

3.1.0

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago