JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 46
  • Score
    100M100P100Q52129F
  • License MIT

Publish Multiple NPM packages from verdaccio storage

Package Exports

  • bulk-npm-publish

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bulk-npm-publish) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Bulk NPM Publish

Build Status

Publish 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\cli@7.3.9)
  • Support publishing only exists packages' versions (need to provide storage path) (⚠️ not supported in env file)

Why I did this tool

In my company we have verdaccio server 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 creating script for publishing multiple npm package

Getting Started

You have 2 options to run this

  1. Interactive input
  2. .env file (will be deprecated in the future)

If registry url specified it will create script with --registry=<registry-url>

Interactive Input

  1. run npm start
  2. type your input
  3. Run the created script that been output

.env

  1. create .env file at the root directory
  2. run npm start
  3. run the created script that been output

Environment file format

create .env file for set the configuration

STORAGE_PATH=<storage-path> # (i.e 'C:\\Users\\<user-name>\\AppData\\Roaming\\verdaccio\\storage\\')
PUBLISH_SCRIPT_DEST_PATH=<script-path> # (i.e './publish-all.bat')
REGISTRY_URL=<registry-url> # (i.e 'http://localhost:4873')

Example

For this options

storage path: 'C:\\Users\\<user-name>\\AppData\\Roaming\\verdaccio\\storage\\'
publish script dest path: './publish-all.bat'
registry url: 'http://localhost:4873' # Verdaccio url

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:

call npm publish C:/Users/<user-name>/AppData/Roaming/verdaccio/storage/@angular/cli/cli-7.3.9.tgz
call npm publish C:/Users/<user-name>/AppData/Roaming/verdaccio/storage/mime/mime-1.6.0.tgz
call npm publish C:/Users/<user-name>/AppData/Roaming/verdaccio/storage/ts-node/ts-node-7.0.1.tgz

Test

Run npm test