forked from dgrubelic/vue-authenticate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
34 lines (30 loc) · 859 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
var gulp = require('gulp'),
connect = require('gulp-connect'),
webpack = require('webpack'),
gulpWebpack = require('gulp-webpack'),
history = require('connect-history-api-fallback')
gulp.task('compile', function () {
var webpackConfig = require('./example/webpack.config.js')
return gulp.src('./example/index.js')
.pipe(gulpWebpack(webpackConfig, webpack))
.pipe(gulp.dest('./example'))
.pipe(connect.reload())
})
gulp.task('server', function () {
connect.server({
name: 'VueAuthentication',
root: './example',
base: 'example',
host: 'localhost',
port: 8080,
livereload: true,
verbose: true,
middleware: function () {
return [history()]
}
});
})
gulp.task('watch', function () {
gulp.watch(['./example/index.js', './src/**/*.js'], ['compile'])
})
gulp.task('dev', ['server'])