mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-19 20:28:53 +00:00
Move build task to gulp
This commit is contained in:
parent
d3360ec403
commit
cfae45a5f7
3 changed files with 20 additions and 6 deletions
|
|
@ -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
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@
|
|||
"scripts": {
|
||||
"test": "./node_modules/.bin/gulp test",
|
||||
"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"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
@ -93,6 +93,7 @@
|
|||
"expect.js": "~0.2.0",
|
||||
"glob": "^4.3.5",
|
||||
"grunt-contrib-imagemin": "^0.9.4",
|
||||
"gulp-grunt": "^0.5.2",
|
||||
"istanbul": "^0.3.14",
|
||||
"karma": "~0.10.2",
|
||||
"karma-chai-plugins": "~0.1.0",
|
||||
|
|
|
|||
18
tasks/gulp-build.js
Normal file
18
tasks/gulp-build.js
Normal 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);
|
||||
});
|
||||
Loading…
Reference in a new issue