-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
56 lines (44 loc) · 1.35 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
var gulp = require('gulp'),
// uglify = require('gulp-uglify'),
// sass = require('gulp-sass'),
// coffee = require('gulp-coffee');
exec = require('child_process').exec;
function runCommand(command) {
return function (cb) {
exec(command, function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
cb(err);
});
};
}
gulp.task('start-mongo', runCommand('mongod'));
gulp.task('compile',runCommand('webpack --watch'));
gulp.task('server',runCommand('node app/index.js'));
gulp.task('start',function(){
gulp.start('start-mongo','compile');
});
// //create a default gulp task
// gulp.task('default', function() {
// //run the sass task, the uglify task, and then run the coffee task
// gulp.start('sass', 'uglify', 'coffee');
// });
// //create an uglify gulp task
// gulp.task('uglify', function() {
// return gulp
// .src(['src/js/**/*.js'])
// .pipe(uglify())
// .pipe(gulp.dest('build/js/'));
// });
// //create a SASS gulp task
// gulp.task('sass', function() {
// return gulp.src('src/sass/**/*.scss')
// .pipe(sass())
// .pipe(gulp.dest('build/css/'));
// });
// //create a coffeescript build gulp task
// gulp.task('coffee', function() {
// gulp.src('./src/coffee/**/*.coffee')
// .pipe(coffee({bare: true}))
// .pipe(gulp.dest('build/js/'))
// });