/
Cakefile
29 lines (24 loc) · 997 Bytes
/
Cakefile
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
muffin = require './src/muffin'
glob = require 'glob'
option '-w', '--watch', 'continue to watch the files and rebuild them when they change'
option '-c', '--commit', 'operate on the git index instead of the working tree'
option '-d', '--compare', 'compare to git refs (stat task only)'
task 'build', 'compile muffin', (options) ->
muffin.run
files: './src/**/*'
options: options
map:
'src/muffin.coffee' : (matches) -> muffin.compileScript(matches[0], 'lib/muffin.js', options)
console.log "Watching src..." if options.watch
task 'stats', 'print source code stats', (options) ->
muffin.statFiles(glob.sync('./src/**/*').concat(glob.sync('./lib/**/*')), options)
task 'doc', 'autogenerate docco anotated source and node IDL files', (options) ->
muffin.run
files: './src/**/*'
options: options
map:
'src/muffin.coffee' : (matches) -> muffin.doccoFile(matches[0], options)
task 'test', ->
invoke 'build'
invoke 'stats'
invoke 'doc'