package
cli tool that cleans up package.json files.
npm install fixpackGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
A package.json file scrubber for the truly insane.
It will re-write your package.json file as follows:
It will warn you if any of these are missing:
Maintain current indentation, End of Line, and Final New Line, or set them to your configured value (see configuration).
Oh, and it will tolerate improperly quoted and comma'd JSON thanks to ALCE.
Oh, and can do same if you pass it a bower.json file or whatnot.
Oh, and it will exit with 0 when already fixed or with 1 otherwise (so combined with --dryRun flag it can be used as CI check)
npm i -g fixpackfixpacknpm i cool_package --save && fixpackIt's configurable. You can create a .fixpackrc file in your project or anywhere up the tree to your $HOME directory. Or overwrite options via CLI arguments.
Uses the rc module to do this. So you can pass all these as CLI args too.
The available options and their defaults shown below:
{
// will put these first in this order if present
sortToTop: [
'name',
'description',
'version',
'author'
],
// will error if these not present
required: [
'name',
'version'
],
// will warn if these not present
warn: [
'description',
'author',
'repository',
'keywords',
'main',
'bugs',
'homepage',
'license'
],
// if `private: true` in package.json will use the next two lists instead
false removal issue.wipe option that sets all dep versions to * for easier bulk updating.optionalDependencies to auto sortedpeerDependencies to default sorted keys..fixpackrc file using rc module.This embarrassing display of insanity, type-A-ness, and OCD brought to you by @HenrikJoreteg.
MIT
henrikjoreteg
henrik@joreteg.com
Estimated unpacked size across 13 packages.
520.4 kB
Includes dependencies.
6 direct · 3 outdated
^1.2.8
1.2.8
1.2.0
1.2.0
^3.0.0
6.0.1
^6.0.0
7.0.2
^1.0.0
1.0.0
^3.1.0
4.0.1