Using Ractive with Browserify

Browserify is a way of using node-style requires in the browser, bundling your scripts into a single file for efficient deployment.

There are three Browserify transforms available that you can use for Ractive.js:

A starter project is available for using Ractivate with gulp.js build system.

Using plugins with Ractive and Browserify

Plugins typically include a Universal Module Definition (UMD) block that, in a node.js or Browserify environment, calls require('ractive'). If you want to be explicit about which version of Ractive gets loaded, you can do it when you configure browserify like so:

browserify.require('./my-copy-of-ractive.js', { expose: 'ractive' });