Created
April 29, 2014 10:47
-
-
Save spacepluk/11396649 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var gulp = require('gulp'); | |
var browserify = require('browserify'); | |
var handleErrors = require('../util/handleErrors'); | |
var source = require('vinyl-source-stream'); | |
var packageJson = require('../../package.json'); | |
var dependencies = Object.keys(packageJson && packageJson.dependencies || {}); | |
gulp.task('libs', function () { | |
return browserify() | |
.require(dependencies) | |
.bundle() | |
.on('error', handleErrors) | |
.pipe(source('libs.js')) | |
.pipe(gulp.dest('./build/')); | |
}); | |
gulp.task('scripts', function () { | |
return browserify('./src/main.js') | |
.external(dependencies) | |
.bundle() | |
.on('error', handleErrors) | |
.pipe(source('main.js')) | |
.pipe(gulp.dest('./build/')); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment