forked from Thinkful-Ed/angular-weather-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
33 lines (29 loc) · 871 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
// Include gulp
var gulp = require('gulp');
var connect = require('gulp-connect');
var uglify = require('gulp-uglify');
var minifyHtml = require('gulp-minify-html');
var minifyCss = require('gulp-minify-css');
var usemin = require('gulp-usemin');
var rev = require('gulp-rev');
var clean = require('gulp-clean');
gulp.task('copy-html-files', function() {
gulp.src(['./app/**/*.html', './app/owm-cities.json', '!./app/index.html'], {base: './app'})
.pipe(gulp.dest('build/'));
});
gulp.task('usemin', function() {
gulp.src('./app/index.html')
.pipe(usemin({
css: [minifyCss(), 'concat', rev()],
js: [uglify(), rev()]
}))
.pipe(gulp.dest('build/'));
});
gulp.task('connect', function() {
connect.server({
root: 'app/'
});
});
// Default Task
gulp.task('default', ['connect']);
gulp.task('build', ['copy-html-files', 'usemin']);