Last active
September 12, 2016 17:02
-
-
Save benmanbs/5639f95939f483f71473 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
'use strict'; | |
var gulp = require('gulp'); | |
var webpack = require('gulp-webpack'); | |
gulp.task('dist', function () { | |
return gulp.src('src/[LIBRARY ENTRY POINT (i.e. backbone.freeze.js)]') | |
.pipe(webpack({ | |
output: { | |
filename: '[NAME OF FINAL FILE (i.e. backbone.freeze.js)]', | |
libraryTarget: 'umd' | |
}, | |
externals: { | |
backbone: { | |
amd: 'backbone', | |
commonjs: 'backbone', | |
commonjs2: 'backbone', | |
root: 'Backbone' | |
}, | |
underscore: { | |
amd: 'underscore', | |
commonjs: 'underscore', | |
commonjs2: 'underscore', | |
root: '_' | |
}, | |
devtool: 'source-map' | |
} | |
})) | |
.pipe(gulp.dest('dist')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment