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

Implement packageFilenames: specify which files get the package.json special treatment #173

Closed
wants to merge 3 commits into from

Conversation

cspotcode
Copy link

Implements #172.

Adds a new option packageFilenames: null | string | Array<string>; Defaults to ['package.json']. Controls which config files will be given special treatment as a package.json file.

If you want to pull config from a packageProp of an alternative file, say manifest.json, you can do that.
You can also disable special-casing entirely, so that package.json can be loaded through the same code paths as any other config file.

Specifies filenames that should get the package.json special treatment,
where they're parsed as strict JSON and the packageProp is extracted.
@cspotcode
Copy link
Author

Updated; tests are passing; coverage is 100%.

@cspotcode
Copy link
Author

I ended up using find-up in mocha, so my use-case for this feature doesn't exist anymore. I appreciate everyone taking the time to discuss. mochajs/mocha#3830

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.

None yet

2 participants