Skip to content

Latest commit

 

History

History
26 lines (24 loc) · 483 Bytes

npm_scripting_notes.md

File metadata and controls

26 lines (24 loc) · 483 Bytes

Npm scripting

write custom script in package.json
// package.json
{
  "name": "package-name",
  "version": "1.0.0",
  "description": "",
  "main": "entry-point.js",
  "dependencies": {
    "some-package": "1.0.0",
  },
  "devDependencies": {},
  "scripts": {
    "your-custom-cli-name": "echo \'any cli command can be put here\' && exit 1"
  },
  "author": "You",
  "license": "ISC"
}
run custom script
$ npm run your-custom-cli-name