forked from ltung/ion-dynamic-tree-list
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
38 lines (32 loc) · 1.05 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
'use strict';
var gulp = require('gulp'),
release = require('gulp-release-tasks')(gulp),
$ = require('gulp-load-plugins')(),
Server = require('karma').Server,
path = require('path');
gulp.task('test', function (done) {
new Server({
configFile: path.join(__dirname, 'tests/karma.conf.js'),
singleRun: true
}, done).start()
});
gulp.task('less', function () {
return gulp.src('./*.less')
.pipe($.less())
.pipe($.cleanCss())
.pipe($.rename({suffix: '.min'}))
.pipe(gulp.dest('.'));
});
gulp.task('updateNpmDependencies', function(){
return gulp.src('package.json')
.pipe($.cedx.david.david({update: true}))
.pipe(gulp.dest('.'))
});
gulp.task('copy', function() {
return gulp.src(['ion-dynamic-tree-list.js', 'ion-dynamic-tree-list.css', 'ion-dynamic-tree-list-tmpl.html'])
.pipe(gulp.dest('gh-pages/ion-dynamic-tree-list/lib/ion-dynamic-tree-list/'));
});
gulp.task('watch', function(){
gulp.watch('./*.less', ['less']);
gulp.watch('**/*.js', ['copy']);
});