From f76558c017420d444878b6d0b97b9a3480a6b0c6 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Sun, 17 Sep 2017 19:05:33 -0700 Subject: [PATCH] Replace minimist & camelize with yargs-parser --- common.js | 7 ++----- package.json | 5 ++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/common.js b/common.js index 8f4ea9aa..0bd24308 100644 --- a/common.js +++ b/common.js @@ -1,12 +1,10 @@ 'use strict' const asar = require('asar') -const camelize = require('camelize') const debug = require('debug')('electron-packager') const download = require('electron-download') const fs = require('fs-extra') const ignore = require('./ignore') -const minimist = require('minimist') const os = require('os') const path = require('path') const pruneModules = require('./prune').pruneModules @@ -14,9 +12,10 @@ const sanitize = require('sanitize-filename') const semver = require('semver') const series = require('run-series') const targets = require('./targets') +const yargs = require('yargs-parser') function parseCLIArgs (argv) { - var args = minimist(argv, { + var args = yargs(argv, { boolean: [ 'all', 'deref-symlinks', @@ -39,8 +38,6 @@ function parseCLIArgs (argv) { args.dir = args._[0] args.name = args._[1] - args = camelize(args) - var protocolSchemes = [].concat(args.protocol || []) var protocolNames = [].concat(args.protocolName || []) diff --git a/package.json b/package.json index ffd38ad7..9dc904ad 100644 --- a/package.json +++ b/package.json @@ -18,14 +18,12 @@ "homepage": "https://github.com/electron-userland/electron-packager", "dependencies": { "asar": "^0.13.0", - "camelize": "^1.0.0", "debug": "^3.0.0", "electron-download": "^4.0.0", "electron-osx-sign": "^0.4.1", "extract-zip": "^1.0.3", "fs-extra": "^4.0.0", "get-package-info": "^1.0.0", - "minimist": "^1.1.1", "parse-author": "^2.0.0", "pify": "^3.0.0", "plist": "^2.0.0", @@ -34,7 +32,8 @@ "resolve": "^1.1.6", "run-series": "^1.1.1", "sanitize-filename": "^1.6.0", - "semver": "^5.3.0" + "semver": "^5.3.0", + "yargs-parser": "^7.0.0" }, "devDependencies": { "buffer-equal": "^1.0.0",