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

bulk-npm-publish

v3.0.2

Published

Publish Multiple NPM packages from verdaccio storage

Downloads

12

Readme

Bulk NPM Publish

Build Status

CLI Tool for Publishing Multiple NPM packages from verdaccio storage

This Library create batch file with the NPM publish command

Features

  • Support publishing to registry
  • Publish scoped packages too (i.e @angular\[email protected])
  • Support publishing only exists packages' versions (need to provide storage path)
  • Have interactive mode (if you don't like the args passing way just pass -i)

Why I did this tool

In my company we use verdaccio for serving packages (like jest, react and many more) in our isolated network.

When we wanted to add more packages there weren't any easy solution (coping storage folder don't work)

So this tool created for solving this issues

Install

Install globally from NPM

npm i bulk-npm-publish -g

Usage

In different OS you would get different examples

$ bulk-npm-publish -h
Usage: bulk-npm-publish [options]

Options:
  --version                Show version number                                                                                                            [boolean]
  -h, --help               Show help                                                                                                                      [boolean]
  -i, --interactive        If you want to provide input interactively                                                                    [boolean] [default: false]
  --sp, --storage-path     What is the path for the storage you want to publish                                                                            [string]
  -o, --output             Where the publish script will be created                                                                                        [string]
  -r, --registry           What is the registry url you want to publish to                                                                                 [string]
  --only-new               Should publish only new packages? (specify --rg|--remote-registry to use custom registry to check for published packages)
                                                                                                                                         [boolean] [default: false]
  --rg, --remote-registry  What is the registry url you want to check for already published packages                                                       [string]

Examples:
  bulk-npm-publish -i                                             Create publish script interactively
  bulk-npm-publish --sp ~/new-storage                             Create publish script at `./publish.sh` with storage content from `~/new-storage`
  bulk-npm-publish --sp ~/new-storage -o /root/publish-script.sh  Create publish script at `/root/publish-script.sh` with storage content from `~/new-storage`
  bulk-npm-publish --sp ~/new-storage -r http://localhost:4873    Create publish script at `./publish.sh` with storage content from `~/new-storage` that will
                                                                  publish to `http://localhost:4873`
  bulk-npm-publish --sp ~/new-storage --only-new                  Create publish script at `./publish.sh` with storage content from `~/new-storage` that doesn't
                                                                  exist in the currnt registry
  bulk-npm-publish --sp ~/new-storage --rg http://localhost:4873  Create publish script at `./publish.sh` with storage content from `~/new-storage` that doesn't
                                                                  exist in `http://localhost:4873`

Example

For this command

$ bulk-npm-publish \
   --storage-path ~/storage \
   --registry http://localhost:4873

And this storage content (the files and folders in the storage path)

storage:
    - @angular:
      - cli: # Scope package
        - cli-7.3.9.tgz
    - mime:
      - mime-1.6.0.tgz
    - ts-node:
      - ts-node-7.0.1.tgz

The output will be:

npm publish ~/storage/@angular/cli/cli-7.3.9.tgz --registry=http://localhost:4873
npm publish ~/storage/mime/mime-1.6.0.tgz --registry=http://localhost:4873
npm publish ~/storage/ts-node/ts-node-7.0.1.tgz --registry=http://localhost:4873

Test

Run npm test