Move run:dev task to gulp

This commit is contained in:
Blade Barringer
2015-09-08 15:45:09 -05:00
parent bb06e95c4e
commit a85116540c
4 changed files with 20 additions and 30 deletions

View File

@@ -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');

View File

@@ -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",

View File

@@ -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);
});

14
tasks/gulp-start.js Normal file
View File

@@ -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/*']
});
});