-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.coffee
executable file
·33 lines (29 loc) · 1.1 KB
/
gulpfile.coffee
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
gulp = require 'gulp'
runSequence = require 'run-sequence'
requireDir = require 'require-dir'
dir = requireDir './task'
del = require 'del'
{exec} = require 'child_process'
browserSync = require 'browser-sync'
reload = browserSync.reload
gulp.task 'install', -> runSequence 'clean', 'bower', 'icon', ['parse', 'html', 'coffee', 'css', 'image']
gulp.task 'clean', (cb) -> del ['./public', './cloud'], -> cb()
gulp.task 'deploy', ['parse'], (cb) ->
exec 'parse deploy', (error, stdout) ->
console.log stdout
cb()
gulp.task 'watch', ->
browserSync.init
notify: false
server: baseDir: './public/'
o = debounceDelay: 10000
gulp.watch [
'./src/coffee/*.coffee'
'./src/coffee/ng/**/*.coffee'
'./src/coffee/parse/class/*.coffee'
], o, ['coffee']
gulp.watch ['./src/coffee/parse/**/*.coffee'], o, ['deploy']
gulp.watch ['./src/css/**/*.css'], o, ['css']
gulp.watch ['./src/icon/*.sketch/Data'], o, ['icon']
gulp.watch ['./src/index.html'], o, ['html']
gulp.watch ['./public/css/style.css', './public/index.html', './public/markdown/*.md'], o, reload