We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some advantages:
This would add support for more ways to configure nollup:
nollup
package.json
.nolluprc
.nolluprc.json
.nolluprc.yaml
.nolluprc.yml
.nolluprc.js
nollup.config.js
It is widely adapted; used by 3.3m github repositories.
It has a documented order in which it will look for configuration.
Starting from process.cwd() it will look for:
process.cwd()
JSON
YAML
.json
.yaml
.yml
.js
.config.js
This should be backwards compatible with the current implementation where the .nolluprc file has precedence over the nolluprc.js file:
nolluprc.js
nollup/lib/cli.js
Lines 93 to 97 in 1411a03
Is there a specific reason the current implementation loads the configuration synchronously (i.e. using fs.existsSync and fs.readFileSync)?
fs.existsSync
fs.readFileSync
Could be replaced with
const cosmiconfigResult = require('cosmiconfig').cosmiconfigSync('nollup').search(); if (cosmiconfigResult && cosmiconfigResult.config) { options = Object.assign({}, options, cosmiconfigResult.config); }
cosmiconfig can be used synchronously as well as asynchronously.
See https://github.com/davidtheclark/cosmiconfig for more information.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Some advantages:
This would add support for more ways to configure nollup:
nollup
property inpackage.json
.nolluprc
file in JSON or YAML format.nolluprc.json
file.nolluprc.yaml
,.nolluprc.yml
, or.nolluprc.js
filenollup.config.js
file exporting a JS objectIt is widely adapted; used by 3.3m github repositories.
It has a documented order in which it will look for configuration.
Starting from
process.cwd()
it will look for:package.json
propertyJSON
orYAML
, extensionless "rc file".json
,.yaml
,.yml
, or.js
..config.js
CommonJS moduleThis should be backwards compatible with the current implementation where the
.nolluprc
file has precedence over thenolluprc.js
file:nollup/lib/cli.js
Lines 93 to 97 in 1411a03
Could be replaced with
See https://github.com/davidtheclark/cosmiconfig for more information.
The text was updated successfully, but these errors were encountered: