@hnp/package-scripts
v1.0.12
Published
Package Maintenance Scripts
Downloads
4
Readme
@hnp/package-scripts
Package Maintenance Scripts
Table of contents
Installation
npm install @hnp/package-scripts --save-dev
Usage
This tool is meant to be used as part of the npm
package scripts in your package.json
.
compile
Updates the project files.
Normalizes
package.json
.- Uses normalize-package-data for basic normalization.
- Ensures the
git-remote
matches thegit.url
field. - Sets the
git.url
as theSSH
version. Usefull on CI and Deployments - Formats the
author
field as the single line form.name <email> (homepage)
- Updates the
contributors
field using thegit history
and theGitHub API
- Ensures a valid
licence
field. - Cleans the results of empty fields and saves a new
package.json
Updates the
README.md
Trying its best to make it standard-readme compilant- Matches the Title to the package name
- Matches the description to the package description
- Updates
## Table of contents
. - Updates
## Installation
.- If the
package.json
fieldprivate
istrue
it will begit clone && npm install
- If the
package.json
fieldpreferGlobal
istrue
it will benpm install -g
- If the
package.json
fieldpreferDev
istrue
it will benpm install -D
- If none of those rules matches it will be
npm install --save
- If the
- Updates
## Usage
by executing the contents ofexample.js
orexamples/index.js
as acode block
.\\ Comments
are converted toparagraphs
console.log()
statements are replaced by what the console prints.
- Updates
## Maintainers
using theAUTHORS
file. - Links
## Changelog
to theCHANGELOG.md
file. - Links
## Licence
to theLICENCE
file. - Scans the resulting document and creates links to repositories, pull requests, issues etc.
Updates the
AUTHORS
file.Updates the
LICENCE
file using @hnp/license-generatorUpdates the
TODO.md
file using leasot- Opt out by using the
--no-todos
flag. - Uses the closest
.gitignore
to figure it out which files scan fot TODOs
- Opt out by using the
Stages the changed files. Making it useful as a pre-commit hook
todos
If the tool is already going to install leasot at least should expose it.
- Uses the closest
.gitignore
to figure it out which files scan for TODOs
version
A thin wrapper over standard-version for convenience.
- It will run
package-scripts compile
as apost-version-bump hook
to keep everything up to date. You can override this hook with--post-bump=${yourcommand}
- If no
CHANGELOG.md
file is found, it will create one as afirst-release
without bumping the version.
Changelog
Find the CHANGELOG here, generated using Conventional Commits.