package
Find configuration for the current file from provided path, workspace, package, settings, HOME directory or env variable
npm install config-profilerGitHub-flavored package documentation.
Across all versions, last 30 days.
41 in 30 days
Runtime metadata.
Tagged topics.
Find configuration for the current file from provided path, settings,
package.json, workspace, HOME directory or env variable.
If you want to thank me, or promote your Issue.
Sorry, but I have work and support for plugins and modules requires some time after work. I will be glad of your support or PR's.
$ npm i -S config-profilerFor example, if your config name is "my-cofig" we will search out configuration in the following places and order:
options.settings):
* Return options.settings if they are the object.
* Return config from oprions.predefinedConfigs by name in the options.settings if is a string and it is found.
* Return config from filepath defined in the options.settings.options.envVariableName)options.configFiles
* package.json if you set options.packagePropnull.const ConfigProfiler = require('config-profiler');
const configProfiler = new ConfigProfiler('./path/to/current/workspace', {
configFiles: ['my-super-module-config.json', 'my-super-module-config.js']
});
configProfiler.getConfig('./path/to/current/file').then((result) => {
console.log(result);
// { from: './bla/bla/my-super-module-config.json', config: { ok: true } }
});See /docs/api.md.
See /docs/options.md.
See the Releases section of our GitHub project for changelogs for each release version.
This software is released under the terms of the MIT license.
Estimated unpacked size across 16 packages.
826.7 kB
Includes dependencies.
6 direct · 4 outdated
^3.0.1
4.4.3
^1.7.1
2.9.1
^3.0.1
3.0.2
^3.0.0
8.3.0
^2.0.0
8.0.0
^2.0.1
2.0.2