forked from jamesflorentino/nanoScrollerJS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCakefile
16 lines (15 loc) · 818 Bytes
/
Cakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
fs = require "fs"
{exec} = require "child_process"
closure = require "./build/closure"
task "build", "Build everything and minify", (options) ->
exec "redcarpet README.md > bin/readme.html", () ->
exec "coffee -c --bare --output bin/javascripts/ coffeescripts/", (err, stdout, stderr) ->
throw err if err
console.log stdout + stderr if (stderr? or stdout?)
fs.readFile "bin/javascripts/jquery.nanoscroller.js", "utf-8", (errReading, data) ->
throw errReading if errReading
closure.compile data, (errCompiling, code) ->
throw errCompiling if errCompiling
fs.writeFile "bin/javascripts/jquery.nanoscroller.min.js", code, (errWriting) ->
throw errWriting if errWriting
console.log "Success!"