-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
38 lines (32 loc) · 891 Bytes
/
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
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
var exec = require('child_process').exec;
var env = require('gulp-env');
gulp.task('watch', function () {
gulp.watch("app/templates/*.html").on('change', reload);
gulp.watch("app/static/**/*.*").on('change', reload);
});
gulp.task('browser-sync', (cb) => {
browserSync.init({
proxy: "localhost:5000"
});
cb();
});
gulp.task('runserver', (cb) => {
exec('flask run', function (err, stdout, stderr) {
console.log(stdout);
console.log(stderr);
});
cb();
});
// gulp.task('nodemon', (cb) => {
// env({
// vars: {
// FLASK_ENV : 'development'
// FLASK_APP : 'main:app'
// }
// });
// cb();
// });
gulp.task('default', gulp.series('runserver', 'browser-sync', 'watch'));