This plugin is for managing Tool Kit hooks that are run from npm scripts (such as npm run test
).
This plugin will be installed as a dependency of the frontend-app, backend-heroku-app, and component plugins so you do not need to install it separately if you are using either of those plugins.
Install @dotcom-tool-kit/npm
as a devDependency
in your app:
npm install --save-dev @dotcom-tool-kit/npm
Add the plugin to your Tool Kit configuration:
plugins:
- '@dotcom-tool-kit/npm'
And install this plugin's hooks:
npx dotcom-tool-kit --install
This will modify your package.json
. You should commit this change.
Event | Description | Installed to... |
---|---|---|
build:local |
Compile any assets or code required for your app to run locally, in development. | build script in package.json (i.e. run from npm run build ) |
test:local |
Run your app's test suite locally, during development. | test script in package.json (i.e. run from npm run test ) |