This module provides a zippy
command that calls the native zip
and unzip
commands.
yarn global add zippy-js
zippy destination.zip source/ [other sources...]
...
unzippy source.zip destination/
package.json:
{
//...
"scripts": {
"build" "...",
"zip": "zippy bundle.zip source/*",
"unzip": "unzippy bundle.zip",
"upload": "....",
"deploy": "npm run build && npm run zip && npm run upload"
}
}
const zippy = require('zippy')
zippy.zip('./destination.zip', ['source/', 'other_soure_file.js']).then(() => {
console.log('all done!')
})