Package Exports
- xrecipe-browserify
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (xrecipe-browserify) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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
}));
}