npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

lerna-isolate

v0.11.2

Published

Extract your app from lerna repository with local package dependencies

Downloads

208

Readme

lerna-isolate

Extract your app or lib as npm package from lerna repository with local/private package dependencies ready to be shipped to your server. Very helpful when using Continuous deployment with lerna and Docker bundling.

What does this do

Let's say you have multiple packages in your monorepo and they depend on some local packages. There is an example of the minimal monorepo. Lerna isolate will put outputs into your lerna root dist directory, so make sure you've got it in .gitignore.

├── lerna.json
├── node_modules
├── package.json
├── package-lock.json
└── packages
    ├── lib1 (published to npm repo)
    ├── lib2 (private)
    └── app

Also, let's say that app depends on lib1 and lib2.

Problems

  1. You can't deploy the app before lib1 is published to registry
  2. You can't deploy the app without lib2, which is a private package

Solution

Bundle it together.

lerna-isolate bundle app

The isolation script will bundle only packages that are not available in the configured npm registry. It also changes package.json and package-lock.json inside the package.

The output will be npm packed package compressed as tgz.

Installation

Either install this globally

npm -g install lerna-isolate

Or just use npx

npx lerna-isolate

Usage

Leverage the CLI text help for your convenience.

List available packages

List packages that can be bundled

lerna-isolate list

Bundle one package

Bundle one package. A package name or a path can be given.

lerna-isolate bundle app

Bundle multiple packages

Bundle multiple packages. A package name or a path can be given.

lerna-isolate bundle app1 app2

Bundle all packages

Bundle all packages.

lerna-isolate bundle

Produce extracted outputs

This is useful when you want to examine contents of the isolated build.

lerna-isolate bundle -e

Produce zip

Sometimes, it is more useful to produce zip file instead of npm package. One example could be that you're uploading Google Cloud Platform Function archive. Private dependencies are still bundled in.

lerna-isolate bundle -e

Clean build artifacts

To clean all built artifacts, simply rin

lerna-isolate clean