In your Client-side JavaScript, require('ractive/build/ractive.runtime') and it'll import the runtime-only version of
ractive. require a .ract file, and it will return a plain javascript object with template and (if defined) css
parameters:

var Ractive =require('ractive/build/ractive.runtime')

var foo =newRactive({

template:require('./views/foo.ract').template,

el:document.getElementById("foo"),

data:...

})

This structure can be passed into Ractive.extend to automatically build Ractive components:

var Ractive =require('ractive/build/ractive.runtime')

var Foo = Ractive.extend(require('./views/foo.ract'))

var foo =newFoo({

el:document.getElementById("foo"),

data:...

})

Extract partials by inspecting the template property:

var foo =require('./views/partials.ract')

if(foo.template.partials){

// foo.template.main has the main template

// foo.template.partials has the partial templates

}

Commandline Browserify usage:

$ browserify -t ractify main.js > bundle.js

If you want to use different file extension, e.g. .html, you can use extension option: