-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
43 lines (36 loc) · 1.01 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
var gulp = require('gulp');
var jshint = require('gulp-jshint');
var concat = require('gulp-concat');
var sass = require('gulp-sass');
var livereload = require('gulp-livereload')
gulp.task('scripts', function(){
gulp.src(['app/js/editor/*.js'])
.pipe(concat('all_editor.js'))
.pipe(gulp.dest('app/js/'))
.pipe(livereload());
gulp.src(['app/js/game/*.js'])
.pipe(concat('all_game.js'))
.pipe(gulp.dest('app/js/'))
.pipe(livereload());
});
gulp.task('styles', function(){
gulp.src(['app/styles/sass/*.scss'])
.pipe(sass())
.pipe(gulp.dest('app/styles/'))
.pipe(livereload())
})
gulp.task('html', function(){
gulp.src(['app/*.html'])
.pipe(livereload())
})
gulp.task('watch', function(){
gulp.watch('app/js/**/*.js', ['scripts'])
gulp.watch('app/styles/sass/*.scss', ['styles'])
gulp.watch('app/*.html', ['html']);
})
gulp.task('jshint', function(){
gulp.src('app/js/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
});
gulp.task('default', ['scripts', 'styles','watch'])