A minimal yet very useful synchronization primitive on top of jQuery Deferreds that is available as a jQuery plugin client-side and a npm package for node server-side.
Latest version of Fence is version 0.4.0
What is it?
See our Introduction to Fence.
- use npm:
npm install fence
- or put
fenceas a dependency in
Fence itself depends on JQDeferred an automated port of jQuery Deferreds to node.
Once Fence is installed,
require it in your code:
var Fence = require( "fence" );
Download the minified or full-text version of the plugin and drop it into your project.
- put a script tag to load the plugin in your html:
- OR use your favorite script loader:
yepnope( "path/to/js/fence.0.4.0.js" );
After that, Fence is available as
jQuery.Fence, that simple.
To build Fence yourself, you need node.
- clone the repository:
git clone git://github.com/jaubourg/fence.git
- enter the newly created directory:
- checkout the version you want to build:
git checkout 0.4.0
- install node dependencies:
- launch the builder:
Node package is now located in
dist/node, jQuery plugin in