-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (29 loc) · 880 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
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
jshint = require('gulp-jshint'),
watch = require('gulp-watch'),
concat = require('gulp-concat'),
rename = require('gulp-rename');
/* copy views */
gulp.task('copy-views', function () {
gulp.src(['./application/**/*.html'])
.pipe(gulp.dest('./public/views'))
});
/* create angular file */
gulp.task('app', function() {
return gulp.src([
'./application/**/*.js'
])
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(concat('app.min.js'))
// .pipe(uglify())
.pipe(gulp.dest('public/js'));
});
/* watch files */
gulp.task('watch', function () {
gulp.watch('./application/**/*.html', ['copy-views']);
gulp.watch('./application/**/*.js', ['app']);
});
/* build task */
gulp.task('build', ['copy-views', 'app', 'watch']);