Move build task to gulp

This commit is contained in:
Blade Barringer
2015-09-04 15:30:44 -05:00
parent d3360ec403
commit cfae45a5f7
3 changed files with 20 additions and 6 deletions

View File

@@ -248,11 +248,6 @@ module.exports = function(grunt) {
); );
}); });
if(process.env.NODE_ENV == 'production')
grunt.registerTask('default', ['build:prod']);
else
grunt.registerTask('default', ['build:dev']);
// Load tasks // Load tasks
grunt.loadNpmTasks('grunt-browserify'); grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-uglify');

View File

@@ -80,7 +80,7 @@
"scripts": { "scripts": {
"test": "./node_modules/.bin/gulp test", "test": "./node_modules/.bin/gulp test",
"start": "grunt run:dev", "start": "grunt run:dev",
"postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f; ./node_modules/.bin/grunt;", "postinstall": "./node_modules/bower/bin/bower --config.interactive=false install -f; ./node_modules/.bin/gulp build;",
"coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html" "coverage": "COVERAGE=true mocha --require register-handlers.js --reporter html-cov > coverage.html; open coverage.html"
}, },
"devDependencies": { "devDependencies": {
@@ -93,6 +93,7 @@
"expect.js": "~0.2.0", "expect.js": "~0.2.0",
"glob": "^4.3.5", "glob": "^4.3.5",
"grunt-contrib-imagemin": "^0.9.4", "grunt-contrib-imagemin": "^0.9.4",
"gulp-grunt": "^0.5.2",
"istanbul": "^0.3.14", "istanbul": "^0.3.14",
"karma": "~0.10.2", "karma": "~0.10.2",
"karma-chai-plugins": "~0.1.0", "karma-chai-plugins": "~0.1.0",

18
tasks/gulp-build.js Normal file
View File

@@ -0,0 +1,18 @@
import gulp from 'gulp';
require('gulp-grunt')(gulp);
gulp.task('build', () => {
if (process.env.NODE_ENV === 'production') {
gulp.start('build:prod');
} else {
gulp.start('build:dev');
}
});
gulp.task('build:dev', (done) => {
gulp.start('grunt-build:dev', done);
});
gulp.task('build:prod', (done) => {
gulp.start('grunt-build:prod', done);
});