nebu icon indicating copy to clipboard operation
nebu copied to clipboard

Support nebu.config.js

Open aleclarson opened this issue 7 years ago • 1 comments

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 avatar May 20 '18 17:05 aleclarson

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.

aleclarson avatar May 25 '18 02:05 aleclarson