aboutsummaryrefslogtreecommitdiff
path: root/node_modules/ipaddr.js/Cakefile
diff options
context:
space:
mode:
authorWaref Haque <warefhaque@Warefs-MacBook-Pro.local>2016-07-17 20:24:49 +0000
committerWaref Haque <warefhaque@Warefs-MacBook-Pro.local>2016-07-17 20:24:49 +0000
commite58943c3e620f05937656fdde032254ae3373f36 (patch)
tree77072aa55efa1753c8c8ae584669cf3589551268 /node_modules/ipaddr.js/Cakefile
parent55098c767afb0b119aaeda330eaedba5c1a87dc3 (diff)
redirect commit
Diffstat (limited to 'node_modules/ipaddr.js/Cakefile')
-rw-r--r--node_modules/ipaddr.js/Cakefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/node_modules/ipaddr.js/Cakefile b/node_modules/ipaddr.js/Cakefile
new file mode 100644
index 0000000..7fd355a
--- /dev/null
+++ b/node_modules/ipaddr.js/Cakefile
@@ -0,0 +1,18 @@
+fs = require 'fs'
+CoffeeScript = require 'coffee-script'
+nodeunit = require 'nodeunit'
+UglifyJS = require 'uglify-js'
+
+task 'build', 'build the JavaScript files from CoffeeScript source', build = (cb) ->
+ source = fs.readFileSync 'src/ipaddr.coffee'
+ fs.writeFileSync 'lib/ipaddr.js', CoffeeScript.compile source.toString()
+
+ invoke 'test'
+ invoke 'compress'
+
+task 'test', 'run the bundled tests', (cb) ->
+ nodeunit.reporters.default.run ['test']
+
+task 'compress', 'uglify the resulting javascript', (cb) ->
+ result = UglifyJS.minify('lib/ipaddr.js')
+ fs.writeFileSync('ipaddr.min.js', result.code)