forked from AbstractedChalupas/sentimentalsoymilk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGulpfile.js
46 lines (39 loc) · 1.09 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
'use strict';
var gulp = require('gulp');
var sync = require('browser-sync');
var nodemon = require('gulp-nodemon');
var KarmaServer = require('karma').Server;
// the paths to our app files
var paths = {
// all our client app js files, not including 3rd party js files
scripts: ['public/js/**/*.js'],
html: ['public/js/templates/*.html', 'public/index.html'],
styles: ['public/css/style.css'],
test: ['specs/**/*.js']
};
// any changes made to your
// client side code will automagically refresh your page
// with the new changes
gulp.task('start', ['serve'], function () {
sync({
notify: true,
// address for server,
injectChanges: true,
files: paths.scripts.concat(paths.html, paths.styles),
proxy: 'localhost:8080'
});
});
// Run our karma tests
gulp.task('karma', function (done) {
new KarmaServer({
configFile: __dirname + '/karma.conf.js'
}, done).start();
});
// start our node server using nodemon
gulp.task('serve', function () {
nodemon({
script: './server/server.js',
ignore: 'node_modules/**/*.js'
});
});
gulp.task('default', ['start']);