-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
39 lines (33 loc) · 1.01 KB
/
gulpfile.js
File metadata and controls
39 lines (33 loc) · 1.01 KB
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
'use strict';
/*global require*/
var gulp = require('gulp');
// load plugins
var $ = require('gulp-load-plugins')();
// min.css, hypercard.css, hyperbox.css
gulp.task('styles', function () {
return gulp.src('styles/*.scss')
.pipe($.rubySass({
sourcemap: false,
style: 'expanded',
precision: 10
}))
.pipe(gulp.dest('.'));
});
// html template may contains reference to images
gulp.task('scripts', function () {
var templateCache = require('gulp-angular-templatecache');
return gulp.src(['templates/*.html'])
.pipe(templateCache({root: '', module: 'ngRoundProgressBar.templates', standalone: true}))
.pipe($.addSrc('scripts/main.js'))
.pipe($.concat('main.js'))
.pipe(gulp.dest('.'));
});
//run all tasks after build directory has been cleaned
gulp.task('default', function () {
gulp.start('styles');
gulp.start('scripts');
});
gulp.task('watch', function () {
gulp.watch('styles/*.scss', ['styles']);
gulp.watch(['templates/*.html', 'scripts/*.js'], ['scripts']);
});