diff --git a/Gruntfile.js b/Gruntfile.js index 50ac0fc4a0..6eef06ec03 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -159,29 +159,6 @@ module.exports = function(grunt) { ], dest: 'website/build/*.css' } - }, - - nodemon: { - dev: { - script: '<%= pkg.main %>' - } - }, - - watch: { - dev: { - files: ['website/public/**/*.styl', 'common/script/**/*.coffee', 'common/script/**/*.js'], // 'public/**/*.js' Not needed because not in production - tasks: [ 'build:dev' ], - options: { - nospawn: true - } - } - }, - - concurrent: { - dev: ['nodemon', 'watch'], - options: { - logConcurrentOutput: true - } } }); @@ -228,8 +205,6 @@ module.exports = function(grunt) { grunt.registerTask('build:dev', ['browserify', 'stylus']); grunt.registerTask('build:test', ['test:prepare:translations', 'build:dev']); - grunt.registerTask('run:dev', [ 'build:dev', 'concurrent' ]); - grunt.registerTask('test:prepare:translations', function() { require('coffee-script'); var i18n = require('./website/src/i18n'), @@ -246,8 +221,6 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-stylus'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-contrib-copy'); - grunt.loadNpmTasks('grunt-nodemon'); - grunt.loadNpmTasks('grunt-concurrent'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-spritesmith'); grunt.loadNpmTasks('grunt-contrib-imagemin'); diff --git a/package.json b/package.json index 4a5cb8471b..9f5d7d60f5 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "grunt": "~0.4.1", "grunt-browserify": "^3.3.0", "grunt-cli": "~0.1.9", - "grunt-concurrent": "~1.0.0", "grunt-contrib-clean": "~0.6.0", "grunt-contrib-copy": "~0.6.0", "grunt-contrib-cssmin": "~0.10.0", @@ -32,7 +31,6 @@ "grunt-contrib-watch": "~0.6.1", "grunt-hashres": "~0.4.1", "grunt-karma": "~0.6.2", - "grunt-nodemon": "~0.3.0", "grunt-spritesmith": "~3.5.0", "gulp": "^3.9.0", "gulp-grunt": "^0.5.2", @@ -83,7 +81,7 @@ }, "scripts": { "test": "./node_modules/.bin/gulp test", - "start": "grunt run:dev", + "start": "gulp run:dev", "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" }, @@ -97,6 +95,7 @@ "expect.js": "~0.2.0", "glob": "^4.3.5", "grunt-contrib-imagemin": "^0.9.4", + "gulp-nodemon": "^2.0.4", "istanbul": "^0.3.14", "karma": "~0.10.2", "karma-chai-plugins": "~0.1.0", diff --git a/tasks/gulp-build.js b/tasks/gulp-build.js index b5956dec73..a45b591d9e 100644 --- a/tasks/gulp-build.js +++ b/tasks/gulp-build.js @@ -13,6 +13,10 @@ gulp.task('build:dev', ['prepare:staticNewStuff'], (done) => { gulp.start('grunt-build:dev', done); }); +gulp.task('build:dev:watch', ['build:dev'], () => { + gulp.watch(['website/public/**/*.styl', 'common/script/*']); +}); + gulp.task('build:prod', ['prepare:staticNewStuff'], (done) => { gulp.start('grunt-build:prod', done); }); diff --git a/tasks/gulp-start.js b/tasks/gulp-start.js new file mode 100644 index 0000000000..33798bf09a --- /dev/null +++ b/tasks/gulp-start.js @@ -0,0 +1,14 @@ +import gulp from 'gulp'; +import nodemon from 'gulp-nodemon'; + +let pkg = require('../package.json'); +require('gulp-grunt')(gulp); + +gulp.task('run:dev', ['nodemon', 'build:dev:watch']); + +gulp.task('nodemon', () => { + nodemon({ + script: pkg.main, + ignore: ['website/public/*', 'website/views/*'] + }); +});