Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
vilicvane committed Oct 5, 2023
1 parent bd611dc commit 8253e6e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@

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

```sh
npm install --global npm-fork
```

## Usage

Use `npm-fork patch` to apply patches to the current project:

```sh
npm-fork patch --scope "@fork" --package "name" --package "@origin/*"
```

Or directly `npm-fork publish`:

```sh
npm-fork publish --scope "@fork" --package "name" --package "@origin/*"
```

## License

MIT License.

0 comments on commit 8253e6e

Please sign in to comment.