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

split out parser into its own well tested module #356

Merged
merged 7 commits into from
Feb 7, 2016
Merged

Conversation

bcoe
Copy link
Member

@bcoe bcoe commented Jan 25, 2016

I've split out the parser into a stand-alone module that handles the configuration bits for us:

See: #352

You can turn on and off parsing features by using the yargs stanza in package.json:

{
  "name": "my-module",
  "yargs": {
     "camel-case-expansion": false
  }
}

@nexdrew addressing your comments in yargs/yargs-parser#1, yargs-parser allows you to configure the cwd which is the approach I was thinking of for loading configuration appropriately.

I'd love to really dial in how the heck we handle loading configuration appropriately in the various contexts:

  • testing yargs-parser and yargs with npm link.
  • running libraries locally that have yargs or yargs-parser as a dependency.
  • running libraries that have been installed globally with -g.

We are trying to solve similar problems with loading a default version from package.json, I wonder if there's room for a clever module here -- I bet we can extend on some of the work Sindresorhus has done (his use-case is slightly different since he can be confident AVA is installed as a development dependency, and is run in the context of a directory, i.e., is not installed globally).

Reviewers: @nexdrew, @lrlna

@bcoe bcoe changed the title [WIP] split out parser into its own well tested module split out parser into its own well tested module Feb 6, 2016
@bcoe
Copy link
Member Author

bcoe commented Feb 7, 2016

I'm going to go ahead and merge this, @nexdrew feel free to make some edits to the documentation in a future pull request.

I've fixed the issues making Windows tests flaky in another pull request.

bcoe added a commit that referenced this pull request Feb 7, 2016
split out parser into its own well tested module
@bcoe bcoe merged commit a9ef966 into 4.x Feb 7, 2016
@bcoe bcoe deleted the split-out-parser branch February 7, 2016 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant