paperclip3x

3.0.1 • Public • Published

Build Status Coverage Status Coverage Status Join the chat at https://gitter.im/mojo-js/paperclip.js

Visit http://paperclipjs.com for further documentation.

Paperclip is a reactive template engine that compiles HTML to DOM. All optimizations happen at compile time, so you can expect snappy and efficient user interfaces across desktop, and mobile devices.

Features

  • very fast
  • explicit data-bindings (1-way, 2-way, unbound)
  • small (41KB gzipped)
  • accepts plain old javascript objects
  • works with any framework
  • no browser dependencies

Roadmap

  • move immutable virtual DOM to a new repo.
  • move more towards hybrid dirty-type checking & observables (ultra fast).

Syntax

template:

 
<input type="text" value="{{ <~> name }}" />
<show when="{{name}}">
  <h3>Hello {{name}}!</h3>
</show>

controller (with brfs):

var pc   = require("paperclip");
var fs   = require("fs");
 
var helloTemplate = pc.template(fs.readFileSync(__dirname + "/template.pc", "utf8"));
var helloView     = helloTemplate.view();
 
document.body.appendChild(helloView.render());

Adapters

Examples

Commands

make test-node    # run unit tests in NodeJS
make test-browser # run unit tests in the browser
make test-cov     # run test coverage tool
make parser       # build the parser
make test-watch   # run the tests and watch them
make browser min  # build for the browser
make lint         # run jshint and jscs

Package Sidebar

Install

npm i paperclip3x

Weekly Downloads

0

Version

3.0.1

License

MIT

Last publish

Collaborators

  • architectd