diff --git a/Cakefile b/Cakefile new file mode 100644 index 0000000..97ed2e0 --- /dev/null +++ b/Cakefile @@ -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 \ No newline at end of file diff --git a/package.json b/package.json index 022db27..62724af 100644 --- a/package.json +++ b/package.json @@ -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" },