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

Support nebu.config.js #3

Open
aleclarson opened this issue May 20, 2018 · 1 comment
Open

Support nebu.config.js #3

aleclarson opened this issue May 20, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@aleclarson
Copy link
Collaborator

aleclarson commented May 20, 2018

When opts.filename is defined, search up the chain of parent directories for a nebu.config.js module. If the module exports an array, use it for opts.plugins. Otherwise, an object should be exported, which is merged into opts.

The opts properties passed to nebu.process take precedence over any defined in nebu.config.js. But the plugins arrays are concatenated if opts.plugins is defined and nebu.config.js exports an array of plugins (or an object with a plugins property). During concatenation, we should take care to remove any duplicate plugins.

You can disable this feature with opts.dotconfig = false.

@aleclarson aleclarson added the enhancement New feature or request label May 20, 2018
@aleclarson
Copy link
Collaborator Author

nebu-cli will support this by default.

But any tools using the JS API have to call nebu.loadConfig(root, overrides) before nebu.process.

When merging plugins arrays, the plugins from overrides appear first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant