forked from code4hk/budget-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
43 lines (37 loc) · 1.14 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
var gulp = require('gulp');
// var gulputil = require('gulp-util');
var watch = require('gulp-watch');
// var uglify = require('gulp-uglify');
// var imagemin = require('gulp-imagemin');
var livereload = require('gulp-livereload');
// var concat = require('gulp-concat');
// var less = require('gulp-less');
// var bower = require('gulp-bower');
// var deploy = require('gulp-gh-pages');
// var minifyCss = require('gulp-minify-css');
// var usemin = require('gulp-usemin');
// var markdown = require('gulp-markdown');
var component = require('gulp-component-build');
var dist = 'dist';
var publicFolder = 'public';
gulp.task('default', ['watch'], function() {
});
gulp.task('reload', function() {
gulp.src(publicFolder + '/*')
.pipe(watch(publicFolder + '/*'))
.pipe(livereload());
})
//TODO fix he components path
gulp.task('components', [], function() {
gulp.src('component.json', {
cwd: publicFolder
})
.pipe(component.scripts({
install: true
}))
.pipe(gulp.dest(publicFolder + '/build/'))
});
gulp.task('watch', function() {
livereload.listen();
gulp.watch(publicFolder + '/*', ['components', 'reload']);
})