-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.coffee
44 lines (39 loc) · 885 Bytes
/
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
34
35
36
37
38
39
40
41
42
43
44
gulp = require 'gulp'
riot = require 'gulp-riot'
jade = require 'gulp-jade'
coffee = require 'gulp-coffee'
plumber = require 'gulp-plumber'
browserify = require 'browserify'
# CoffeeScript
gulp.task 'coffee', ->
gulp.src './src/bin/*.coffee'
.pipe plumber()
.pipe coffee()
.pipe gulp.dest './src/bin'
# Riot.js
gulp.task 'riot', ->
gulp.src './src/scripts/components/*.tag'
.pipe plumber()
.pipe riot
compact : true
type : 'coffeescript'
template : 'jade'
.pipe gulp.dest './src/scripts/components'
# Jade
gulp.task 'jade', ->
gulp.src './src/views/*.jade'
.pipe plumber()
.pipe jade()
.pipe gulp.dest './src/views'
gulp.task 'default', ['coffee', 'riot', 'jade']
gulp.task 'watch', ->
gulp.watch [
'./src/bin/*.coffee'
'./src/scripts/components/*.tag'
'./src/views/*.jade'
],
[
'coffee'
'riot'
'jade'
]