0
0
Fork 0
mirror of https://github.com/liabru/matter-js.git synced 2024-11-30 10:20:52 -05:00

fix gulp build version replacement

This commit is contained in:
liabru 2016-11-03 00:40:57 +00:00
parent 9ccc0288fc
commit faf6bec864

View file

@ -250,14 +250,14 @@ var build = function(options) {
gutil.log('Building', filename, options.date); gutil.log('Building', filename, options.date);
var compiled = gulp.src(['src/module/main.js']) var compiled = gulp.src(['src/module/main.js'])
.pipe(replace('@@VERSION@@', options.version))
.pipe(through2.obj(function(file, enc, next){ .pipe(through2.obj(function(file, enc, next){
browserify(file.path, { standalone: 'Matter' }) browserify(file.path, { standalone: 'Matter' })
.bundle(function(err, res){ .bundle(function(err, res){
file.contents = res; file.contents = res;
next(null, file); next(null, file);
}); });
})); }))
.pipe(replace('@@VERSION@@', options.version));
if (options.version.indexOf('-dev') === -1) { if (options.version.indexOf('-dev') === -1) {
compiled.pipe(preprocess({ context: { DEBUG: false } })); compiled.pipe(preprocess({ context: { DEBUG: false } }));