The Grafana Incident Node client library allows you to access the Grafana Incident API from your Typescript or JavaScript code.
- Get started with the Grafana Incident API documentation
- Or dive deep into the JavaScript reference docs
npm install @grafana/incident-node
# or
yarn add @grafana/incident-node
This project uses TSDX. Start dev environment with:
npm start
# or
yarn start
This builds to /dist
and runs the project in watch mode so any edits you save inside src
causes a rebuild to /dist
.
To do a one-off build, use npm run build
or yarn build
.
To run tests, use npm test
or yarn test
.
Set up with prettier
, husky
, and lint-staged
. Adjust the respective fields in package.json
accordingly.
Jest tests are set up to run with npm test
or yarn test
.
size-limit
is set up to calculate the real cost of your library with npm run size
and visualize the bundle with npm run analyze
.
We use Rollup as a bundler and generate multiple rollup configs for various module formats and build settings.
Two actions are active:
main
which installsdeps
w/ cache, lints, tests, and builds on all pushes against a Node and OS matrixsize
which comments cost comparison of your library on every pull request usingsize-limit
We recommend using np.