This is a little package to get the configuration of your package that you can override using "npm config set ...".
Normally, this information is only accessible when your script is invoked by "npm run".
NPM is not very friendly with this wonderful feature. There is no API, and no '--json' option to 'npm config list'.
Usage:
const npc = require('@doodad-js/npc');
const result = npc.list([package_name], [options]);
New since version 0.5.0:
const result = npc.listSync([package_name], [options]);
const result = npc.listAsync([package_name], [options]);
Where:
"package_name" : (optional) Name of the package
"options" : (optional) An object which provide options by key/value pairs.
"result" : The result of the function.
Options:
"async" : ("npc.list" only) When 'true', the function will return a Promise. When 'false', the function will return the result. Default is 'false'.
"Promise" : Provides the Promise constructor. Default is 'global.Promise'.
"module" : Provides the Node.js module object used to resolve files. Default is the parent module of '@doodad-js/npc'.
-
Notifications
You must be signed in to change notification settings - Fork 0
Retrieve any package's configuration (node.js)
License
doodadjs/npm-package-config
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Retrieve any package's configuration (node.js)
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published