More work on unified version for browsers and node.

Relates to #739
This commit is contained in:
Jürg Lehni 2016-01-26 20:02:23 +01:00
parent 15797903cf
commit e1a51f858a
15 changed files with 249 additions and 253 deletions

View file

@ -23,8 +23,7 @@ var gulp = require('gulp'),
// object, merged in with the options required above.
var buildOptions = {
full: { paperScript: true },
core: { paperScript: false },
node: { environment: 'node', paperScript: true }
core: { paperScript: false }
};
var buildNames = Object.keys(buildOptions);
@ -32,9 +31,13 @@ var buildNames = Object.keys(buildOptions);
gulp.task('build',
buildNames.map(function(name) {
return 'build:' + name;
})
}).concat(['build:copy'])
);
gulp.task('build:copy', function() {
gulp.src(['src/node/*.js']).pipe(gulp.dest('dist/node'));
});
buildNames.forEach(function(name) {
gulp.task('build:' + name, ['clean:build:' + name, 'minify:acorn'], function() {
return gulp.src('src/paper.js')