fruitmachine

A lightweight component layout engine for client and server.

npm install fruitmachine
5 downloads in the last day
146 downloads in the last week
1 970 downloads in the last month

FruitMachine Build Status

A lightweight component layout engine for client and server.

FruitMachine is designed to build rich interactive layouts from modular, reusable components. It's light and unopinionated so that it can be applied to almost any layout problem. FruitMachine is currently powering the FT Web App.

// Define a module
var Apple = fruitmachine.define({
  name: 'apple',
  template: function(){ return 'hello' }
});

// Create a module
var apple = new Apple();

// Render it
apple.render();

apple.el.outerHTML;
//=> <div class="apple">hello</div>

Installation

$ npm install fruitmachine

or

$ bower install fruitmachine

or

Download the production version (~2k gzipped) or the development version.

Examples

Documentation

Tests

With PhantomJS

$ npm install
$ npm test

Without PhantomJS

$ node_modules/.bin/buster-static

...then visit http://localhost:8282/ in browser

Author

Contributors

Credits and collaboration

The lead developer of FruitMachine is Wilson Page at FT Labs. All open source code released by FT Labs is licenced under the MIT licence. We welcome comments, feedback and suggestions. Please feel free to raise an issue or pull request.

npm loves you