Closed JamieMason closed 8 years ago
Add to the README that it is possible to call shrinkpack from within node.
shrinkpack
Shrinkpack works in 2 phases;
var shrinkpack = require('shrinkpack'); shrinkpack.analyse({ compress: false, directory: process.cwd(), keepOptional: false }).then(function (data) { shrinkpack.update(data); });
TODO expose cli.run() as shrinkpack.cli() in ./index.js.
cli.run()
shrinkpack.cli()
./index.js
This approach does the same as the above, but also writes out all the additional logging that you see when using shrinkpack normally.
var cli = require('shrinkpack/src/cli'); cli.run({ compress: false, directory: process.cwd(), keepOptional: false });
Add to the README that it is possible to call
shrinkpack
from within node.1. Node API
Shrinkpack works in 2 phases;
2. Internal API for the CLI
This approach does the same as the above, but also writes out all the additional logging that you see when using
shrinkpack
normally.