From 67fdec20726e48ba3a934cb25bb30d47ec4a4f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yaroslav=20De=20La=20Pe=C3=B1a=20Smirnov?= Date: Wed, 29 Nov 2017 11:44:34 +0300 Subject: Initial commit, version 0.5.3 --- node_modules/ipaddr.js/Cakefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 node_modules/ipaddr.js/Cakefile (limited to 'node_modules/ipaddr.js/Cakefile') diff --git a/node_modules/ipaddr.js/Cakefile b/node_modules/ipaddr.js/Cakefile new file mode 100644 index 0000000..a6de48f --- /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', 'utf-8' + 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) -> + source = fs.readFileSync 'lib/ipaddr.js', 'utf-8' + fs.writeFileSync('ipaddr.min.js', UglifyJS.minify(source).code) -- cgit v1.2.3