-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
33 lines (28 loc) · 1.19 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
var gulp = require('gulp');
var serve = require('gulp-serve');
var clean = require('gulp-clean');
gulp.task('clean:demo', function() {
return gulp.src(['./demo/components', './demo/services', './demo/libs'], {read: false})
.pipe(clean());
});
gulp.task('copy:components', function() {
gulp.src(['./src/*'])
.pipe(gulp.dest('./demo/components/'));
gulp.src(['./node_modules/@banno/jha-design-components/cards/jha-card.html',
'./node_modules/@banno/jha-design-components/container/jha-container.html'])
.pipe(gulp.dest('./demo/components/jha-design'));
});
gulp.task('copy:libs', function() {
gulp.src(['./node_modules/@banno/polymer/polymer.js',
'./node_modules/chart.js/dist/Chart.js',
'./node_modules/moment/moment.js',
'./node_modules/webcomponentsjs/lite.js'])
.pipe(gulp.dest('./demo/libs'));
});
gulp.task('watch', function() {
gulp.watch('./src/**/*', ['clean', 'copy']);
});
gulp.task('serve', serve('./demo'));
gulp.task('clean', function() { gulp.start('clean:demo'); });
gulp.task('copy', ['clean:demo'], function() { gulp.start('copy:components', 'copy:libs'); });
gulp.task('default', ['clean', 'copy', 'serve', 'watch']);