0.7.58 • Published 4 years ago

mikado-compile v0.7.58

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
4 years ago

Mikado Template Compiler

You will find the documentation of Mikado here.

Install

It is recommended to install the compiler as a non-global dependency to your stack:

npm install mikado-compile

CLI

Compile a source file, takes same directory as destination:

npx mikado-compile tpl/app.html

Compile a source file to a given destination folder:

npx mikado-compile src/tpl/app.html dest/tpl/

Compile a source file in a specific format:

npx mikado-compile src/tpl/app.html json

Compile all files which matches a given expression:

npx mikado-compile src/tpl/*.html
npx mikado-compile src/**/*.html

Compile files explicitly by using option flags:

npx mikado-compile --src src/tpl/*.html --dest dest/tpl/ --type json

Compile files explicitly by using option flag shortcuts:

npx mikado-compile -s src/tpl/*.html -d dest/tpl/ -t json

Force overwrite existing files (silent):

npx mikado-compile src/tpl/*.html --force

Compile as pretty print (non-minified):

npx mikado-compile src/tpl/*.html --pretty

Node Module

You can call the compile function directly:

const compile = require("mikado-compile");
const src = "./src/*.html";
const dest = "./dist/";

compile(src, dest, {
    type: ["es5", "es6", "json"],
    force: true,
    pretty: false
});

File Watcher

Start the file watcher to compile templates automatically when file contents change:

npx mikado-compile src/tpl/*.html --watch

Press CTRL + C to stop the watcher.

Note: Existing files will be overridden by default when running the watcher.

0.7.58

4 years ago

0.7.53

5 years ago

0.7.52

5 years ago

0.7.51

5 years ago

0.7.5

5 years ago

0.7.44

5 years ago

0.7.2

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.0

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago