Coder Social home page Coder Social logo

jimf / paperclip.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crcn/paperclip.js

0.0 2.0 0.0 14.27 MB

reactive DOM template engine built for speed, and extensibility

Home Page: http://paperclipjs.com

License: MIT License

JavaScript 99.99% HTML 0.01%

paperclip.js's Introduction

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

paperclip.js's People

Contributors

mathiasbynens avatar redchair123 avatar

Watchers

Jim Fitzpatrick avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.