npm-offline-packager

1.3.0 • Public • Published

npm-offline-packager

A CLI tool to download and publish NPM packages tarboll (with all dependencies)
for offline npm registry (verdaccio, artifactory, etc.)

Install

$ npm install -g npm-offline-packager

Usage

npo fetch - Fetch packages tarball from npm registry

 $ npo fetch <list of packages or a path to package-json file>
  Options:

    -p, --package-json <packageJson>  The path to package.json file
    --top <top>                       Fetch top packages from npm registry api. <max: 5250>
    -d, --dest <dest>                 Packages destination folder
    --no-tar                          Whether to create tar file from all packages
    --no-cache                        Whether to save download packages in cache
    --dev                             Whether to resolved dev dependencies
    --peer                            Whether to resolved peer dependencies
    --optional                        Whether to resolved optional dependencies
    -r, --registry <registry>         The registry url,Defaults to https://registry.npmjs.org/
    -h, --help                        output usage information

Examples

To fetch a list of packages

 $ npo fetch express @types/express bluebird

To fetch dependencies from package.json file

 $ npo fetch -p ./package.json

To fetch top n packages from npm registry api

 $ npo fetch --top n

npo publish - Publish packages tarball to private npm registry

$  npo publish <path to tarball file or folder>
  Options:

    -r, --registry <registry>      The private registry url
    -s, --skip-login               Whether to skip npm login command
    -f, --force                    Whether to publish with --force flag
    -c, --concurrent <concurrent>  How many packages to publish concurrently (default: 20)
    -h, --help                     output usage information
    --del-package                  After successful publication package deleting the package file (.tgz) 

License

This project is licensed under the MIT License - see the LICENSE file for details

Package Sidebar

Install

npm i npm-offline-packager

Weekly Downloads

18

Version

1.3.0

License

MIT

Unpacked Size

34.5 kB

Total Files

10

Last publish

Collaborators

  • sh770