cli.js 331 B

12345678910111213141516171819
  1. #!/usr/bin/env node
  2. 'use strict'
  3. const download = require('./')
  4. const minimist = require('minimist')
  5. let opts = minimist(process.argv.slice(2))
  6. if (opts['strict-ssl'] === false) {
  7. opts.strictSSL = false
  8. }
  9. download(opts, (err, zipPath) => {
  10. if (err) throw err
  11. console.log('Downloaded zip:', zipPath)
  12. process.exit(0)
  13. })