preprocessor :)

beta.r3js.org
Theunis J. Botha 2016-11-23 11:16:46 +01:00
parent d2a62e0dbe
commit c1ff7c8fab
1 changed files with 19 additions and 7 deletions

View File

@ -9,7 +9,7 @@ var watch = require('gulp-watch');
var preprocessor = require('gulp-c-preprocessor'); var preprocessor = require('gulp-c-preprocessor');
gulp.task( gulp.task(
'build', 'merge',
function() { function() {
return gulp.src('./src/game-lib-*.js') return gulp.src('./src/game-lib-*.js')
.pipe(sort()) .pipe(sort())
@ -36,7 +36,7 @@ gulp.task('test-prepare', function(){
gulp.task( gulp.task(
'test', 'test',
['build', 'test-prepare'], ['merge', 'test-prepare'],
function() { function() {
gulp.src('./test/test.*.js') gulp.src('./test/test.*.js')
.pipe(sort()) .pipe(sort())
@ -60,7 +60,7 @@ gulp.task(
); );
gulp.task('compileRuntime', ['build'], gulp.task('compileRuntime', ['merge'],
function() { function() {
gulp.src(['./defines/runtime.js', './build/game-lib.js']) gulp.src(['./defines/runtime.js', './build/game-lib.js'])
.pipe(concat('game-lib-runtime.js')) .pipe(concat('game-lib-runtime.js'))
@ -99,7 +99,7 @@ gulp.task('compileRuntime', ['build'],
} }
); );
gulp.task('compileEditor', ['build'], gulp.task('compileEditor', ['merge'],
function() { function() {
gulp.src(['./defines/editor.js', './build/game-lib.js']) gulp.src(['./defines/editor.js', './build/game-lib.js'])
.pipe(concat('game-lib-editor.js')) .pipe(concat('game-lib-editor.js'))
@ -138,11 +138,23 @@ gulp.task('compileEditor', ['build'],
} }
); );
gulp.task(
'build',
[
'merge',
'compileRuntime',
'compileEditor'
],
function() {
}
);
gulp.task( gulp.task(
'default', 'default',
[ [
'build', 'merge',
'compileRuntime', 'compileRuntime',
'compileEditor' 'compileEditor'
], ],
@ -152,10 +164,10 @@ gulp.task(
], ],
function() { function() {
gulp.start([ gulp.start([
'build', 'merge',
'compileRuntime', 'compileRuntime',
'compileEditor' 'compileEditor'
]); ]);
}) })
} }
); );