localpacker
v1.0.0-alpha.1
Published
A CLI tool to package and install local dependencies.
Downloads
6
Maintainers
Readme
Quick Start Guide for localpacker
localpacker
is a CLI tool that simplifies packaging and installing local dependencies in your project.
Installation
You can install localpacker
either globally or locally in your project:
Global Installation (recommended for system-wide use):
npm install -g localpacker
This allows you to use the
localpack
command in any project.Local Installation (specific to a single project):
npm install localpacker --save-dev
Then, run the command with
npx
:npx localpack /path/to/consuming-project
Usage
Once installed, you can use the localpack
command to package and install a local dependency in another project.
localpack /path/to/consuming-project
Commands
Install and Package Local Dependency:
localpack /path/to/consuming-project
This command will:
- Update the package version in
localpacker
. - Build and create a
.tgz
package file. - Update the dependency in the target project to use the local
.tgz
file. - Install the updated dependency in the target project.
- Update the package version in
Clean Up Changes:
localpack /path/to/consuming-project --clean
This command will:
- Revert the version change in
localpacker
. - Remove
.tgz
files generated during packaging. - Restore the original dependency version in the target project.
- Revert the version change in
Examples
Package and Install:
localpack /Users/username/my-consuming-app
Clean Up Changes:
localpack /Users/username/my-consuming-app --clean
And that’s it! localpacker
is ready to help you manage your local dependencies effortlessly.