Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (35 sloc) 1.31 KB
fs = require('fs')
{spawn, exec} = require('child_process')
execCmds = (cmds) ->
exec cmds.join(' && '), (err, stdout, stderr) ->
output = (stdout + stderr).trim()
console.log(output + '\n') if (output)
throw err if err
task 'build', 'Build the library', ->
execCmds [
'cd src/sel',
'cat >',
'cd ../..',
'coffee --compile --bare --output lib src/sel/',
'coffee --compile --bare --output lib src/extras/',
task 'size', 'Print the size of the compressed library', ->
execCmds [
'cake build',
'cat lib/sel.js | uglifyjs | gzip -9f | wc -c',
task 'test', 'Build the test suite', ->
execCmds [
'cake build',
'coffee --compile --bare --output test src/test/*.coffee',
'ln -sf ../src/test/index.html test',
'ln -sf ../src/test/template.html test',
'ln -sf ../src/test/vows.css test',
'npm install --dev',
'ln -sfn ender-vows node_modules/vows',
'cd test',
'ln -sfn ../node_modules node_modules',
'rm -rf node_modules/sel',
'node_modules/.bin/ender build ender-vows ..',
'cd ..',