Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace minimist & camelize with yargs-parser #732

Merged
merged 1 commit into from Sep 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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