forked from jonstipe/number-polyfill
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cakefile
18 lines (17 loc) · 788 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
fs = require 'fs'
UglifyJS = require 'uglify-js'
{exec} = require 'child_process'
task 'build', 'Build project from *.coffee to *.js', ->
exec 'coffee --compile --output ./ src/number-polyfill.coffee', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr
exec 'coffee --compile --output test/ src/spec.coffee', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr
fs.writeFile 'number-polyfill.min.js', UglifyJS.minify('number-polyfill.js').code, 'utf8', (err) ->
throw err if err
console.log stdout + stderr
exec 'sass src/number-polyfill.scss ./number-polyfill.css', (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr
console.log 'Done.'