Home

Awesome

surplusify

A browserify transform for compiling Surplus JSX views.

How to install

> npm install --save-dev surplusify

Run from command-line

> browserify --transform surplusify main.js > dist/bundle.js

Run from gulp

// gulpfile.js
var gulp = require('gulp'),
    browserify = require('browserify'),
    surplusify = require('surplusify'),
    source = require('vinyl-source-stream');
 
gulp.task('browserify', function() {
    return browserify({
            entries: [ 'main.js' ]
        })
        .transform(surplusify)
        .bundle()
        .pipe(source('bundle.js'))
        .pipe(gulp.dest('./dist'));
});