organize-pkg
v1.3.0
Published
very simple package.json organizer
Downloads
39
Readme
organize package json (organize-pkg)
Assists in creating package.json for production.
install
npm i organize-pkg -D
flags
-prod|-p
{boolean} - apply production output. can omit-out|-o
option. (output to ./dist)-keys|-k
- should be remove keys.-out|-o
- specify output path if need.-keepDevs|-kd
- If necessary, specify the key name to be retained indevDependencies
. valid with-prod|-p
flag. (version1.3.0
)# keep `devDependencies/some-enteyName` and `devDependencies/some-enteyName2` orgpkg -kd "some-enteyName,some-enteyName2" -p # or # keep `devDependencies/some-enteyName` orgpkg -kd some-enteyName -p
usage
organize-pkg -keys "<key>,<key>,..." -out ./output.json
# or
orgpkg -k "<key>,<key>,..." -out ./output.json
version
1.2.4
, When specify-prod|-p
option can omit-out|-o
option# output to "./dist/package.json" orgpkg -k "dependencies/some-module,bin/organize-pkg" -p
version
1.2.3
, support command like:orgpkg -k "dependencies/some-module" -p -o ./dist
orgpkg -k "dependencies/some-module,bin/organize-pkg" -p -o ./dist
version
1.2.2
, synonym commandorgpkg
orgpkg -p -o ./output.json [-k "<key>,<key>,..."]
Since version
1.2.1
, shorthand option is available.
# file name is output as "./dist/package.json"
>organize-pkg -keys "defs,//" -out ./dist
>organize-pkg -k "defs,//" -o ./dist
# file name is output as "./dist/output.json"
>organize-pkg -keys "defs,//" -out ./dist/output.json
>organize-pkg -k "defs,//" -o ./dist/output.json
- Delete the
devDependencies
property required during development
organize-pkg -keys "devDependencies" -out ./dist
- Remove any property
organize-pkg -keys "defs,//" -out ./dist
If you don't need to run a script such as "postinstall"
when installing the desired module with (yarn|npm) install
,
specify "-prod"
option to specify properties such as "scripts"
, "devDependencies"
, "//<any text>?"
. Can be deleted.
In that case, the value of
"-keys"
option will be optional, and if it is specified it will be merged
organize-pkg -prod -out ./dist [-keys "defs"]
organize-pkg -p -o ./dist [-k "defs"]
License
MIT