Sha256: 95f935d9e679b736e785c9ae8a1050f562bd47a77261a7474dabad4844c95e11
Contents?: true
Size: 899 Bytes
Versions: 54
Compression:
Stored size: 899 Bytes
Contents
var gulp = require('gulp'); var gutil = require('gulp-util'); var browserify = require('browserify'); var watchify = require('watchify'); var source = require('vinyl-source-stream'); // bundler used to run watchify and browserify var bundler = watchify(browserify(watchify.args, {standalone: 'NUTELLA'})); // add the lib file to bundle bundler.add('./src/nutella_lib.js'); gulp.task('bundle', bundle); // so you can run `gulp js` to build the file bundler.on('update', bundle); // on any dep update, runs the bundler bundler.on('log', gutil.log); // output build logs to terminal function bundle() { return bundler.bundle() // log errors if they happen .on('error', gutil.log.bind(gutil, 'Browserify Error')) .pipe(source('nutella_lib.js')) .pipe(gulp.dest('./dist')); } gulp.task('default', function() { // place code for your default task here });
Version data entries
54 entries across 54 versions & 1 rubygems