-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (34 loc) · 935 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
35
36
37
38
var jshint = require('gulp-jshint');
var ngmin = require('gulp-ngmin');
var uglify = require('gulp-uglify');
var ngAnnotate = require('gulp-ng-annotate');
var cleanCSS = require('gulp-clean-css');
var concat = require('gulp-concat');
var gulp = require('gulp');
gulp.task('lint', function() {
return gulp.src('./*.js')
.pipe(jshint())
.pipe(jshint.reporter('gulp-jshint-html-reporter', {
filename: __dirname + 'jshint-output.html',
createMissingFolders: false
}));
});
gulp.task('ngmin', function() {
return gulp.src('angularapp.js')
.pipe(jshint())
.pipe(ngmin({dynamic:true}))
.pipe(gulp.dest('dist'));
});
gulp.task('uglify', function() {
return gulp.src('./*.js')
.pipe(uglify())
.pipe(gulp.dest('dist'));
});
gulp.task('compile', function() {
return gulp.src('angularapp.js')
.pipe(jshint())
.pipe(concat('minapp.js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(gulp.dest('dist'))
});