Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Documentation

Table of Contents

General

CLI Commands

Build UMD and ES modules

npm run build

Build UMD modules

npm run build:umd

Build ES modules

npm run build:es

Prettify files

npm run prettify

Run linter

npm run lint

Run linter and fix

npm run lint:fix

Run Tests

npm test

Bumping a patch version. This will increment package.json version and run preversion, version and postversion hooks.

# patch 0.0.x
npm version patch
# minor 0.x.0
npm version minor
# major x.0.0
npm version major

Publish to npm

npm login
npm publish

Check outdated dependencies

# Add -u or --update flag for update
npx npm-check

Scripts

prepare will run both before the package is packed and published, and on local npm install

"prepare": "npm run build"

prepublishOnly will run before prepare and only on npm publish

"prepublishOnly": "npm test && npm run lint"

preversion will run before bumping a new package version

"preversion": "npm run lint"

version will run after a new version has been bumped. A commit and a new version-tag will be made every time you bump a new version. This command will run before the commit is made.

"version": "npm run prettify && git add -A src"

postversion will run after the commit has been made. Pushes the commit and the tag.

"postversion" : "git push && git push --tags"