/
Sakefile
41 lines (33 loc) 路 884 Bytes
/
Sakefile
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
use 'sake-bundle'
use 'sake-outdated'
use 'sake-publish'
use 'sake-test'
use 'sake-version'
task 'clean', 'clean project', (options) ->
exec 'rm -rf lib/'
task 'build', 'build project', (options) ->
b = new Bundle()
yield b.write
entry: 'src/index.coffee'
formats: ['cjs', 'es']
yield b.write
entry: 'src/cli.coffee'
format: 'cli'
executable: true
yield b.write
entry: 'src/client/index.coffee'
output: 'bebop.min.js'
format: 'web'
browser: true
minify: false
sourceMap: false
task 'watch', 'watch for changes and recompile project', ->
build = (filename) ->
return if (running 'build')
console.log filename, 'modified'
invoke 'build'
watch 'src/*', build
watch 'node_modules/*', build
task 'gh-pages', 'Publish docs to gh-pages', ->
brief = require 'brief'
brief.update()