1.1.4 • Published 2 years ago

copy-partial-json v1.1.4

Weekly downloads
9
License
ISC
Repository
github
Last release
2 years ago

copy-partial-json

A simple script to copy portions of a json document from one file to another

npm Build Status NPM Typescript

To copy the version, name and dependency list from a root package.json to child packages:

$ copy-partial-json -s package.json -t one/package.json -t two/package.json -k version name dependencies

Using npm scripts this can be done automatically when npm version is run:

{
    "scripts": {
        "version": "copy-partial-json -g -t childOne/package.json -k version"
    }
}

Options

ArgumentAliasTypeDescription
sourceFilesstringThe json file to copy from. Defaults to 'package.json'
targetFiletstring[]The json file to copy to
keyskstring[]The keys to copy. For example, 'version,name,dependencies'
jsonIndentinumberThe number of spaces to indent your json file by. Defaults to 4.
gitAddgbooleanadds any target files to git after updating
helphbooleanShow this help text
1.1.4

2 years ago

1.1.3

2 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

0.0.1

4 years ago