ceri-compiler
compiles template strings for ceriJS
Last updated 2 years ago by paulpflug .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ceri-compiler 
SYNC missed versions from official npm registry.

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

// syntax
// template(version:Number or String, template: String)
template = template(1,"<div></div>")

// output
template = function(){return [this.el("div",{},[])]}

// using consolidate.js
template = template("pug.1","div")
<div class=someClass></div> <!-- simple attribute -->
<!-- directives -->
<div :class=nameOfVar></div> <!-- bind local scope variable to attribute -->
<div @click=nameOfFunction></div> <!-- bind local scope function to event -->
<div :click.toggle=nameOfVar></div> <!-- set modifier to binding -->
<div> <!-- use elemental directives to pass further options -->
  <@click=nameOfVar toggle>
</div> 

<div :class.expr=@nameOfVar></div> <!-- create a inline expression '@' is short for 'this.' -->

<div><slot></slot></div> <!-- define a slot -->
<div>Hello {{@greeted}}</div> <!-- create a inline expression -->

License

Copyright (c) 2017 Paul Pflugradt Licensed under the MIT license.

Current Tags

  • 1.1.4                                ...           latest (2 years ago)

12 Versions

  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.5                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 39
Dependencies (9)
Dev Dependencies (6)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |