forked from json-schema-form/angular-schema-form-material
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
39 lines (33 loc) · 928 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
39
var gulp = require('gulp'),
streamqueue = require('streamqueue'),
minifyHtml = require('gulp-minify-html'),
templateCache = require('gulp-angular-templatecache'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify');
gulp.task('build', function() {
var stream = streamqueue({objectMode: true});
stream.queue(
gulp.src('./src/**/*.html')
.pipe(minifyHtml({
empty: true,
spare: true,
quotes: true
}))
.pipe(templateCache({
module: 'schemaForm',
root: 'decorators/material/'
}))
);
stream.queue(gulp.src('./src/**/*.js'));
stream.done()
.pipe(concat('material-decorator.js'))
.pipe(gulp.dest('./'))
.pipe(uglify())
.pipe(rename('material-decorator.min.js'))
.pipe(gulp.dest('./'));
});
gulp.task('watch', function() {
gulp.watch('./src/**/*', ['default']);
});
gulp.task('default', ['build']);