Skip to content

Commit

Permalink
add cake file to build, install this stuff in windows!
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddkai committed Nov 7, 2013
1 parent 8fff434 commit 7149f6c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions Cakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
fs = require 'fs'
path = require 'path'
{spawn} = require 'child_process'

INPUT_PATH = path.join __dirname, 'source'
OUTPUT_PATH = path.join __dirname, 'lib'
CMD = (process.platform == 'win32') ? 'coffee.cmd' : 'coffee'


task 'build', 'Build lib/ form source/', ->
coffee = spawn CMD, ['-c', '-o', OUTPUT_PATH, INPUT_PATH]
coffee.stderr.pipe process.stderr
coffee.stdout.pipe process.stdout
coffee.on 'error', (err) ->
console.error err
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"node": ">= 0.8.0"
},
"scripts": {
"build": "coffee -o ./lib/ -c ./source/*.coffee",
"build": "cake build",
"install": "npm run build",
"test": "npm install && grunt test"
},
Expand Down

0 comments on commit 7149f6c

Please sign in to comment.