ceri-compiler
compiles template strings for ceriJS
Install
npm install --save-dev ceri-compiler
Usage
Usage: ceri-compiler [options] <file ...>
Options:
-h, --help output usage information
-V, --version output the version number
-o, --out [folder] out
-b, --bundle make a bundle
-w, --webpack webpack config to use for bundle creation
-v [version] (required) compiler version to use
Example
ceri-compiler -b someComp.js
Features of template Strings
Version 1
template = template(1,"<div></div>")
template = function(){return [this.el("div",{},[])]}
template = template("pug.1","div")
<div class=someClass></div>
<div :class=nameOfVar></div>
<div @click=nameOfFunction></div>
<div :click.toggle=nameOfVar></div>
<div>
<@click=nameOfVar toggle>
</div>
<div :class.expr=@nameOfVar></div>
<div><slot></slot></div>
<div>Hello {{@greeted}}</div>
License
Copyright (c) 2017 Paul Pflugradt
Licensed under the MIT license.