Skip to content

Commit

Permalink
Merge pull request #732 from electron-userland/use-yargs-parser
Browse files Browse the repository at this point in the history
Replace minimist & camelize with yargs-parser
  • Loading branch information
malept committed Sep 19, 2017
2 parents ca17721 + f76558c commit 2bfc1d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 2 additions & 5 deletions common.js
@@ -1,22 +1,21 @@
'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
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',
Expand All @@ -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 || [])

Expand Down
5 changes: 2 additions & 3 deletions package.json
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 2bfc1d9

Please sign in to comment.