-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
47 lines (40 loc) · 1.3 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
44
45
46
var gulp = require('gulp'),
component = require('gulp-component'),
uglify = require('gulp-uglify'),
rename = require('gulp-rename'),
less = require('gulp-less'),
jshint = require('gulp-jshint'),
util = require('gulp-util'),
minifyCSS = require('gulp-minify-css'),
shell = require('gulp-shell')
//mocha = require('gulp-mocha'),
//mochaPhantomJS = require('gulp-mocha-phantomjs'),
//server = require('./server'),
//serverPort = 5000
var paths = {
scripts: ['src/**/*.js'],
tests: 'test/**/*.js'
}
gulp.task('default', function () {
})
gulp.task('server', function () {
gulp.watch(['component.json', 'src/**/*'], ['build'])
server.listen(serverPort)
})
gulp.task('go-run', shell.task([
'run'
]))
gulp.task('less', function () {
gulp.src('assets/css/style.less')
.pipe(less())
.pipe(gulp.dest('assets/css/'))
.pipe(minifyCSS({keepBreaks:false}))
.pipe(gulp.dest('assets/css/'))
})
gulp.task('watch', function () {
//server.listen(serverPort)
//gulp.watch(['**/*.go'], ['go-run'])
//gulp.watch(['*.exe'], ['go-run'])
gulp.watch(['assets/css/**/*.less'], ['less'])
//gulp.watch(['test/**/*.*'], ['test'])
})