Skip to content

Instantly share code, notes, and snippets.

@seethroughdev
Created August 6, 2014 08:10
Show Gist options
  • Save seethroughdev/e204d70fb9e25b00b784 to your computer and use it in GitHub Desktop.
Save seethroughdev/e204d70fb9e25b00b784 to your computer and use it in GitHub Desktop.
Simplest Gulp-Browserify setup I could come up with.
'use strict';
var gulp = require('gulp')
, browserify = require('browserify')
, source = require('vinyl-source-stream');
// Load plugins
var $ = require('gulp-load-plugins')();
var env = process.env.NODE_ENV || 'development';
// Options
var browserifyOpts = {
debug: true
};
// Scripts
gulp.task('scripts', function () {
return browserify('./index.js', browserifyOpts).bundle()
.pipe(source('./index.js'))
.pipe($.rename('svg-fallbacker.browser.min.js'))
.pipe(gulp.dest('./dist'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment