-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (33 loc) · 952 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 gulp = require('gulp');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
var angularTemplates = require('gulp-angular-templates');
gulp.task('templates', function() {
var stream = gulp.src('src/templates/*.html')
.pipe(angularTemplates({
module: 'ro.dropdown',
standalone: false
}))
.pipe(gulp.dest('tmp/angular-templates'));
return stream;
});
gulp.task('js', ['templates'], function() {
var stream = gulp.src([
'src/js/_module.js',
'src/js/*.js',
'tmp/angular-templates/*.js'
])
.pipe(concat('ro-dropdown.js'))
.pipe(gulp.dest('dist'));
return stream;
});
gulp.task('minify', ['js'], function() {
var stream = gulp.src('dist/ro-dropdown.js')
.pipe(uglify())
.pipe(rename('ro-dropdown.min.js'))
.pipe(gulp.dest('dist'));
return stream;
})
gulp.task('build', ['js', 'minify']);
gulp.task('default', ['build']);