npm

Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript.Learn more »

bundle-checker

1.3.2 • Public • Published

Build Status NPM Version TypeScript code style: prettier

bundle-checker 🔎📦

Compare the size of build files in two git branches.

bundle-chercker

Summary:

Usage

If cloning a private repository, please make sure the GITHUB_TOKEN env variable is available.

$ npx bundle-checker compare \
        --gitRepository='https://github.com/ramda/ramda.git' \
        --installScript='yarn' \
        --buildScript='yarn build:es' \
        --currentBranch='CrossEye-patch-1' \
        --targetBranch='master' \
        --buildFilesPatterns='build/**/*.js,build/**/*.css'

All parameters are optionals, defaults:

Parameter Default
buildScript NODE_ENV=production npm run build
currentBranch current branch detected
gitRepository repo where command is run
installScript npm install
prComment false
targetBranch master
buildFilesPatterns build/**/*.js,build/**/*.css

Post result as PR comment

Add --prComment to post the results as pr Comment after a CI job.

$ npx bundle-checker --prComment

The command needs 3 env variable set:

var Desc
PULL_REQUEST_NUMBER Number of pull request
PULL_REQUEST_SLUG e.g. facebook/react
GITHUB_TOKEN secret to be setup

If you're working with Travis, no need to setup env variables PULL_REQUEST_NUMBER or PULL_REQUEST_SLUG. Those are read from TRAVIS_PULL_REQUEST and TRAVIS_PULL_REQUEST_SLUG automatically.

Develop and test locally the CLI

$ yarn pack
$ ./bin/run compare

cli scaffoling built with https://github.com/oclif/oclif

install

npm i bundle-checker

Downloadsweekly downloads

2

version

1.3.2

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability