npm-fork

0.0.5 • Public • Published

NPM version Repository package.json version MIT License

npm-fork

Publish forks of npm packages with ease.

Occasionally, we fork an npm project to fix some bugs or add some features. But to publish the forked package, we have to manually change the package name and version in package.json and JavaScript files. This tool automates the process and leave the source code untouched.

What it does?

  1. It patches package.json and JavaScript files (using npm-packlist) with different/additional scope and prerelease versions.
  2. It runs npm publish to publish the forked packages.
  3. It runs git restore . to reset the patches after publishing.

Installation

npm install --global npm-fork

Usage

Commit or stage your changes and then use npm-fork patch to apply patches to the current project:

# single package
npm-fork patch --scope "@fork"

# multiple packages
npm-fork patch --scope "@fork" --package "name" --package "@origin/*"

# use package paths instead of names if workspace is not configured or recognized (e.g., pnpm).
npm-fork patch --scope "@fork" --package "packages/*"

Or directly npm-fork publish:

npm-fork publish --scope "@fork"

License

MIT License.

Readme

Keywords

none

Package Sidebar

Install

npm i npm-fork

Weekly Downloads

0

Version

0.0.5

License

MIT

Unpacked Size

45.3 kB

Total Files

40

Last publish

Collaborators

  • vilicvane