forked from shift/design.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cakefile
19 lines (16 loc) · 828 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{spawn, exec} = require 'child_process'
mint = require 'mint'
fs = require 'fs'
task 'coffee', ->
coffee = spawn './node_modules/coffee-script/bin/coffee', ['-o', 'lib', '-w', 'src']
coffee.stdout.on 'data', (data) -> console.log data.toString().trim()
#coffee2 = spawn './node_modules/coffee-script/bin/coffee', ['-w', 'test', '-o', 'test']
#coffee2.stdout.on 'data', (data) -> console.log data.toString().trim()
#coffee2.stderr.on 'data', (data) -> console.log data.toString().trim()
task 'build', ->
result = fs.readFileSync "./src/design.io/client.coffee", "utf-8"
mint.coffee result, {}, (error, result) ->
fs.writeFileSync "design.io.js", result
mint.uglifyjs result, (error, compressed) ->
fs.writeFile "design.io.min.js", compressed
setTimeout((=>), 1000)