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

context-bootstrap

v1.0.0

Published

Bootstrap project for creating a new context with Lerna in place

Downloads

2

Readme

Overview

Bootstrap project for creating a new context — monorepo with multiple packages inside.

This could be useful when you:

  1. want to isolate projects with the same business scope;
  2. want to make your life easier managing dependencies.

For this purpose this bootstrap use Lerna.

Lerna is a tool that optimizes the workflow around managing multi-package repositories with git and npm.

Development

  • By default Lerna has "version": "independent" setup (check lerna.json for it). It allows to increment package versions independently of each other.

  • All the packages located under /packages folder by default. You can change it by specifying "packages": ["packages/*"] within lerna.json.

Basic workflow example:

  • Add new package to /packages or simply create a new one by running npm init within /packages/${YOUR_PACKAGE_NAME}.

  • yarn lerna bootstrap — bootstrap the packages in the current Lerna repo. Installs all of their dependencies and links any cross-dependencies. Run it instead of yarn install every time you add new package to /packages.

  • git commit -m "Changed something very important"

  • yarn lerna publish

Some additions:

  • yarn lerna version --conventional-commits — will create a newer version for all the packages with the history of changes and store it as part of the project. Example: https://github.com/taxfix/context-bootstrap/blob/master/packages/taxfix-lerna-test-1/CHANGELOG.md. Be aware that this command automatically pushes the changes;

  • yarn lerna version --conventional-commits --no-push — the same but without pushing changes. This you have to accomplish manually;

  • yarn lerna publish from-git --yes — this will identify packages tagged by lerna version and publish them to npm.

This is useful in CI scenarios where you wish to manually increment versions, but have the package contents themselves consistently published by an automated process.

Other useful commands:

  • yarn lerna diff — diff all packages or a single package since the last release;
  • yarn lerna link — symlink together all Lerna packages that are dependencies of each other in the current Lerna repo;
  • yarn lerna ls --json — show packges information in JSON format.

Live examples

Feel free to play around with the real examples within this repo (check /packages folder).