forked from owenashurst/agar.io-clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
92 lines (80 loc) · 2.51 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
const { series } = require('gulp');
var babel = require('gulp-babel');
var jshint = require('gulp-jshint');
var nodemon = require('gulp-nodemon');
var uglify = require('gulp-uglify');
var util = require('gulp-util');
var mocha = require('gulp-mocha');
var webpack = require('webpack-stream');
// gulp.task('build', ['build-client', 'build-server', 'test']);
// gulp.task('test', ['lint'], function () {
// gulp.src(['test/**/*.js'])
// .pipe(mocha());
// });
// gulp.task('lint', function () {
// return gulp.src(['**/*.js', '!node_modules/**/*.js', '!bin/**/*.js'])
// .pipe(jshint({
// esnext: true
// }))
// .pipe(jshint.reporter('default', { verbose: true}))
// .pipe(jshint.reporter('fail'));
// });
// gulp.task('build-client', ['lint', 'move-client'], function () {
// return gulp.src(['src/client/js/app.js'])
// .pipe(webpack(require('./webpack.config.js')))
// //.pipe(uglify())
// .pipe(gulp.dest('bin/client/js/'));
// });
// gulp.task('move-client', function () {
// return gulp.src(['src/client/**/*.*', '!client/js/*.js'])
// .pipe(gulp.dest('./bin/client/'));
// });
// gulp.task('build-server', ['lint'], function () {
// return gulp.src(['src/server/**/*.*', 'src/server/**/*.js'])
// .pipe(babel())
// .pipe(gulp.dest('bin/server/'));
// });
// gulp.task('watch', ['build'], function () {
// gulp.watch(['src/client/**/*.*'], ['build-client', 'move-client']);
// gulp.watch(['src/server/*.*', 'src/server/**/*.js'], ['build-server']);
// gulp.start('run-only');
// });
// gulp.task('run', ['build'], function () {
// console.log('[RUNNING]');
// nodemon({
// delay: 10,
// script: './server/server.js',
// cwd: "./bin/",
// args: ["config.json"],
// ext: 'html js css'
// })
// .on('restart', function () {
// util.log('server restarted!');
// });
// });
// gulp.task('run-only', function () {
// nodemon({
// delay: 10,
// script: './server/server.js',
// cwd: "./bin/",
// args: ["config.json"],
// ext: 'html js css'
// })
// .on('restart', function () {
// util.log('server restarted!');
// });
// });
function run(done) {
nodemon({
delay: 10,
script: './src/server/server.js',
// cwd: "./bin/",
args: ["config.json"],
ext: 'html js css'
})
.on('restart', function () {
util.log('server restarted!');
});
};
exports.run = run;
exports.default = series(run);