forked from Rennoid/Pickup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
79 lines (67 loc) · 1.61 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
var gulp = require('gulp');
var livereload = require('gulp-livereload');
var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
/*
PASTE <script src="//localhost:35729/livereload.js"></script>
IN THE HEAD OF THE PAGE FOR LIVERELOAD TO WORK
*/
var paths = {
scripts: 'client/public/assets/js/*.js',
images: 'client/public/assets/img/*.*',
styles: 'client/public/assets/css/*.css',
angularScripts: 'client/public/app/**/*.js',
html: ['client/public/index.html','client/public/app/**/*.html'],
server: 'server/**/*.js'
};
gulp.task('angular', function() {
return gulp.src([
paths.angularScripts
])
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.pipe(livereload());
});
gulp.task('scripts', function() {
return gulp.src([
paths.scripts
])
.pipe(jshint())
.pipe(jshint.reporter(stylish))
.pipe(livereload());
});
gulp.task('styles', function() {
return gulp.src([
paths.styles
])
.pipe(livereload());
});
gulp.task('html', function() {
return gulp.src(
paths.html
)
.pipe(livereload());
});
gulp.task('images', function() {
return gulp.src([
paths.images
])
.pipe(livereload());
});
gulp.task('server', function() {
return gulp.src([
paths.server
])
.pipe(jshint())
.pipe(jshint.reporter(stylish));
});
gulp.task('watch', function () {
livereload.listen();
gulp.watch(paths.scripts,['scripts']);
gulp.watch(paths.html,['html']);
gulp.watch(paths.images,['images']);
gulp.watch(paths.styles,['styles']);
gulp.watch(paths.angularScripts,['angular']);
gulp.watch(paths.server,['server']);
});
gulp.task('default', ['watch']);