forked from rajeshwarpatlolla/ionic-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gulpfile.js
executable file
·38 lines (33 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
var path = require('path');
var gulp = require('gulp');
var clean = require('gulp-clean');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var ngHtml2Js = require("gulp-ng-html2js");
var minifyHtml = require("gulp-minify-html");
var minifycss = require("gulp-minify-css");
gulp.task('html2js', function () {
gulp.src(['./src/*.html'])
.pipe(minifyHtml())
.pipe(ngHtml2Js({
moduleName: "ionic-datepicker.templates"
}))
.pipe(concat("templates.js"))
.pipe(uglify())
.pipe(gulp.dest("./dist"));
});
gulp.task('build',['html2js','cssminify'], function () {
gulp.src(['./src/ionic-datepicker.js'])
.pipe(uglify())
.pipe(gulp.dest("./dist"));
});
gulp.task('cssminify', function () {
return gulp.src('./src/*.css')
.pipe(minifycss())
.pipe(gulp.dest('./dist'));
});
gulp.task('clean', function () {
return gulp.src('dist', {read: false})
.pipe(clean());
});
gulp.task('default',['clean','build']);