bundle-dependencies

Generates bundledDependencies package.json value using values of the dependencies property.

BSD-3-Clause 24 个版本
安装
npm install bundle-dependencies
yarn add bundle-dependencies
pnpm add bundle-dependencies
bun add bundle-dependencies
README

bundle-dependencies

NPM version Travis build status js-canonical-style

Generates bundledDependencies package.json value using values of the dependencies property. Updates package.json definition using the generated bundledDependencies value.

Install

npm install bundle-dependencies

Add to package.json:

{
    "scripts": {
        "bundle-dependencies": "bundle-dependencies"
    }
}

Options

bundle-dependencies --help
Commands:
  list-bundled-dependencies  Lists names of bundled dependencies.
  update                     Updates package.json bundledDependencies
                             definition.

Options:
  --help  Show help                                                    [boolean]
bundle-dependencies update --help
Options:
  --help     Show help                                                 [boolean]
  --exclude  A space-separated list of dependencies not to include in the
             bundledDependencies definition.               [array] [default: []]

Usage

To simply update bundledDependencies of the package.json in the current working directory, execute the script:

npm run bundle-dependencies update

Publishing

When publishing a package using bundledDependencies property, make sure that your nodu_modules/ directory includes only bundled dependencies, i.e. the module must be install using npm install --production [list of bundled dependencies]. Use this script to do it:

{
    "bundle-publish": "npm run bundle-dependencies update; git commit -m 'Bundled dependencies.' ./package.json; git push; rm -fr ./node_modules; npm install --production $(bundle-dependencies list-bundled-dependencies); npm dedupe; npm prune; npm publish; npm install;"
}
版本列表
1.0.2 2016-02-22
1.0.1 2016-02-22
1.0.0 2016-02-22
0.0.24 2016-01-05
0.0.22 2016-01-04
0.0.21 2016-01-04
0.0.20 2016-01-04
0.0.19 2016-01-04
0.0.18 2016-01-04
0.0.16 2016-01-04
0.0.14 2016-01-04
0.0.13 2016-01-04
0.0.12 2016-01-04
0.0.11 2016-01-04
0.0.10 2016-01-04
0.0.9 2016-01-04
0.0.8 2016-01-04
0.0.6 2016-01-04
0.0.5 2016-01-04
0.0.4 2016-01-04
0.0.3 2016-01-04
0.0.2 2016-01-04
0.0.1 2016-01-04
0.0.0 2016-01-04