forked from erickangMSFT/sqldevops
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
37 lines (33 loc) · 990 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
'use strict';
const gulp = require('gulp');
const nodemon = require('gulp-nodemon');
const eslint = require('gulp-eslint');
const watchFiles = ['*.js', './src/**/*.js'];
gulp.task('inject', () => {
const wiredep = require('wiredep').stream;
const inject = require('gulp-inject');
const options = {
bowerJason: require('./bower.json'),
directory: './public/lib',
ignorePath: '../../public'
};
const injectSrc = gulp.src(['./public/css/*.css', './public/js/*.js'], { read: false });
const injectOptions = {
ignorePath: '/public'
};
return gulp.src('./src/views/*.ejs')
.pipe(wiredep(options))
.pipe(inject(injectSrc, injectOptions))
.pipe(gulp.dest('./src/views'));
});
gulp.task('default', ['inject'], () => {
const options = {
script: './bin/www',
delayTime: 1,
env: {
PORT: 8000,
},
watch: watchFiles,
};
return nodemon(options);
});