Skip to content
This repository was archived by the owner on Aug 10, 2020. It is now read-only.

add arg parser to base command #12

Merged
merged 1 commit into from
Jul 17, 2019
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"lodash.merge": "^4.6.1",
"lodash.snakecase": "^4.1.1",
"make-dir": "^1.3.0",
"minimist": "^1.2.0",
"netlify": "^2.2.1",
"node-fetch": "^2.3.0",
"uuid": "^3.3.2",
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const openBrowser = require('./utils/open-browser')
const findRoot = require('./utils/find-root')
const { track, identify } = require('./utils/telemetry')
const merge = require('lodash.merge')
const argv = require('minimist')(process.argv.slice(2))
const { NETLIFY_AUTH_TOKEN } = process.env

// Netlify CLI client id. Lives in [email protected]
Expand All @@ -23,7 +24,7 @@ class BaseCommand extends Command {
async init(err) {
const projectRoot = findRoot(process.cwd())
// Grab netlify API token
const [ token ] = this.getConfigToken()
const [ token ] = this.getConfigToken(argv.auth)
// Get site config from netlify.toml
const configPath = getConfigPath(projectRoot)
// TODO: https://github.com/request/caseless to handle key casing issues
Expand Down