module-tidyup

0.0.2 • Public • Published

module-tidyup

Build Status

A simple utility to tidy up Node.js module package.json before publishing

Why?

Before we publish a module to npm registry, typically there are a few things that requires tidy-up.

  • The module version
  • The license
  • Dependencies that use internal git/http urls
  • Set private to be false

Install

npm install -g module-tidyup

Usage

tidyup [-i] [-u] [-d] [-v version] [-l license]

Options:

  • -i: Run npm install -f first to refresh the dependencies
  • -u: Update the package.json, if not set, the revised content is dumped to stdout
  • -d: Update dependency versions, default to 'all'
    • all: include latest, *, and git urls
    • latest: include latest, *
    • git: incldue git urls
  • -v version: Update the version, default to '1.0.0'
    • major: increase the major
    • minor: increase the minor
    • patch: increase the patch
    • prerelease: increase the prerelease
    • x.y.z: set a version
  • -l license: Update the license, default to 'MIT'

What does it do?

  • Run npm install -f (if -i)
  • Run npm ls --json
  • Open package.json and tidy it up
  • Write the result back to package.json (if -u)

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i module-tidyup

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • rfeng