Gathering detailed insights and metrics for yargs-command-config
Gathering detailed insights and metrics for yargs-command-config
Gathering detailed insights and metrics for yargs-command-config
Gathering detailed insights and metrics for yargs-command-config
npm install yargs-command-config
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
44 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jan 08, 2018
Latest Version
1.0.5
Package Id
yargs-command-config@1.0.5
Size
6.54 kB
NPM Version
4.2.0
Node Version
7.9.0
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Richard Wen
rrwen.dev@gmail.com
Yargs command for managing config files
npm
npm install --save yargs yargs-command-config
For the latest developer version, see Developer Install.
Create a file named bin.js
with the following contents:
1var yargs = require('yargs'); 2 3// (config) Load command with path to config JSON file 4// Replace './path/to/config.json' with your config JSON file 5var config = require('yargs-command-config')({file: './path/to/config.json'}); 6 7// (yargs) Add command to manage config file 8var argv = yargs.command(config).argv;
Display help options for bin.js
using node:
node bin.js config help
The following will be displayed:
bin config <task> [key] [value] [--config]
manage default config
<task> is one of:
* set
* delete
* view
* clear
* reset
Set option to value
> set [key] [value]
Remove default option
> delete [key]
View default options
> view
Clear default options
> clear
Reset default options
> reset
Manage other config file
> set [key] [value] --config other.json
> delete [key] --config other.json
> view --config other.json
> clear --config other.json
> reset --config other.json
Options:
--help Show help [boolean]
Default config files are managed with the commands below:
node bin.js config view
node bin.js config clear
node bin.js config reset
node bin.js config set key value
node bin.js config delete key
Other config files are managed by passing a path in the option --config
:
node bin.js config view --config config.json
node bin.js config clear --config config.json
node bin.js config reset --config config.json
node bin.js config set key value --config config.json
node bin.js config delete key --config config.json
See Documentation for more details.
Reports for issues and suggestions can be made using the issue submission interface.
When possible, ensure that your submission is:
Code contributions are submitted via pull requests:
A template of the code contribution explanation is provided below:
## Purpose
The purpose can mention goals that include fixes to bugs, addition of features, and other improvements, etc.
## Description
The description is a short summary of the changes made such as improved speeds or features, and implementation details.
## Changes
The changes are a list of general edits made to the files and their respective components.
* `file_path1`:
* `function_module_etc`: changed loop to map
* `function_module_etc`: changed variable value
* `file_path2`:
* `function_module_etc`: changed loop to map
* `function_module_etc`: changed variable value
## Notes
The notes provide any additional text that do not fit into the above sections.
For more information, see Developer Install and Implementation.
Install the latest developer version with npm
from github:
npm install git+https://github.com/rrwen/yargs-command-config
Install from git
cloned source:
npm
git clone https://github.com/rrwen/yargs-command-config
cd yargs-command-config
npm install
git clone https://github.com/rrwen/yargs-command-config
cd yargs-command-config
npm install
npm test
Use documentationjs to generate html documentation in the docs
folder:
npm run docs
See JSDoc style for formatting syntax.
yargs-command-config
folder, add all files and commit changesgit add .
git commit -a -m "Generic update"
git push
package.json
npm test
npm run docs
npm login
npm publish
The module yargs-command-config uses the following npm packages for its implementation:
npm | Purpose |
---|---|
yargs | Manage command line arguments and options |
fs | Read and write JSON config files |
yargs <-- CLI arguments
|
fs <-- JSON config files
options.task.file
and [--file]
are now options.task.config
and [--config]
respectivelyNo vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More