xrecipe-browserify
v0.0.9
Published
Browserify task for gulp
Downloads
4
Readme
xrecipe-browserify
Browserify task for gulp - easy one
Installation
Simply install it with NPM
npm install xrecipe-browserify --save-dev
Usage Example
var browserifyTask = require('xrecipe-browserify');
var browserifyTaskConfig = {
sourcePath: 'front/index.jsx',
destinationPath: 'back/public/javascripts',
destinationName: 'application.js',
extensions: [
'.jsx'
],
transformsFunctions: [
browserifyTask.getTransformFunction('babelify')
],
includePaths: [
'front/modules/'
]
};
gulp.task('browserify', browserifyTask.create(browserifyTaskConfig));
gulp.task('browserify:watch', browserifyTask.create(browserifyTaskConfig, true));
Transforms Functions
There are some transform functions included and you can use them with:
var browserifyTask = require('xrecipe-browserify');
var transformFunction = browserifyTask.getTransformFunction('babelify');
You will also have to install the needed packages, depending on the transform you want.
If you can't find the one you need, you can simply write yours:
var browserifyTask = require('xrecipe-browserify');
var transformFunction = function (bundler) {
bundler.transform(require('browserify-jade').jade({
pretty: true
}));
}