mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Move build task to gulp
This commit is contained in:
@@ -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');
|
||||||
|
|||||||
@@ -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
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);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user