Skip to content

Commit

Permalink
Suggest using npm pkg (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed May 28, 2023
1 parent 6715246 commit 2fbc1b3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions README.md
Expand Up @@ -46,21 +46,20 @@ Usage:
dot-json <file> <key-path> --delete Delete a key by key-path
Options:
--indent=<n> Indent with <n> of white space characters [default: auto] [--json-value]
--indent=<n> Indent with <n> of white space characters [default: auto]
-d --delete Delete the key-path
-j --json-value Parse the input value as a JSON string (to set whole objects or arrays)
-h --help Show this message with options
-v --version Print the version number
```

### Quick tip for editing package.json
Add to .bash_profile:
```bash
alias package="dot-json package.json"
```
Use it like this:

If you want to change package.json, you can use npm’s [`pkg` command](https://docs.npmjs.com/cli/commands/npm-pkg) instead of `dot-json`:

```bash
package name "my-package"
npm pkg get scripts.test
npm pkg set name=my-new-package
```

### Use it in NodeJS
Expand Down

0 comments on commit 2fbc1b3

Please sign in to comment.