-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathgulpfile.js
49 lines (43 loc) · 1.28 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
var gulp = require('gulp');
var concat = require('gulp-concat');
var template = require('gulp-ng-templates');
var rename = require('gulp-rename');
var ngAnnotate = require('gulp-ng-annotate');
var uglify = require('gulp-uglify');
var gulp = require('gulp');
var git = require('gulp-git');
var bump = require('gulp-bump');
var filter = require('gulp-filter');
var tag_version = require('gulp-tag-version');
var minifyHtml = require("gulp-minify-html");
var minifyCSS = require('gulp-minify-css');
//Build Vars
var finalName = 'jquery.wizard';
gulp.task('default', ['build']);
// Then save the main provider in the same tmp dir
gulp.task('mkSrc', function() {
return gulp.src('./src/*.js')
// .pipe(concat('all.js'))
.pipe(gulp.dest('./.tmp/'));
});
gulp.task('minifyCss', function () {
gulp.src('./src/*.css')
.pipe(concat(finalName +'.css'))
.pipe(gulp.dest('./dist'))
.pipe(minifyCSS())
.pipe(rename({
extname: '.min.css'
}))
.pipe(gulp.dest('./dist'));
});
gulp.task('build', ['mkSrc','minifyCss'], function() {
return gulp.src('./.tmp/*.js')
.pipe(ngAnnotate())
.pipe(concat(finalName + ".js"))
.pipe(gulp.dest('./dist'))
.pipe(uglify())
.pipe(rename({
extname: '.min.js'
}))
.pipe(gulp.dest('./dist'));
});