-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcakefile
More file actions
21 lines (18 loc) · 683 Bytes
/
cakefile
File metadata and controls
21 lines (18 loc) · 683 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'use strict'
require 'cake-gulp'
option '-w', '--watch', 'Watch files for changes.'
coffeeFiles = ["#{__dirname}/lib/**/*.coffee"]
task 'build:coffee', 'Builds CoffeScript files from ./lib to ./build', (options, callback) ->
src coffeeFiles
.pipe sourcemaps.init()
.pipe (
coffee bare: no
.on 'error', log)
.pipe(sourcemaps.write())
.pipe dest "#{__dirname}/build"
.pipe debug title: 'coffee:'
callback()
task 'build', 'Builds all the files for this project, -w to watch for file changes.', ['build:coffee'], (options) ->
if options.watch
log "[#{green 'Watching'}] /lib/**/*.coffee files"
watch coffeeFiles, ['build:coffee']