Sha256: 09770494fbdeb930d46d8cd02e3d4d7549861d507fb6c601d5196572e296986a
Contents?: true
Size: 774 Bytes
Versions: 2
Compression:
Stored size: 774 Bytes
Contents
#!/usr/bin/env node var fs = require('fs'), AssetGraph = require('assetgraph'), commandLineOptions = require('optimist') .demand(1) .argv; new AssetGraph() .loadAssets(commandLineOptions._) .pullGlobalsIntoVariables({type: 'JavaScript'}, {wrapInFunction: true}) .compressJavaScript() .queue(function (assetGraph) { var text = assetGraph.findAssets()[0].text + "\n"; if (commandLineOptions.o) { fs.writeFile(commandLineOptions.o, text, 'utf-8', function (err) { if (err) { throw err; } }); } else { console.log(text); } }) .run(function (err) { if (err) { throw err; } });
Version data entries
2 entries across 2 versions & 1 rubygems