Deprecated. Used promoted-snowplow-logger instead
This package no longer works.
promoted-event-logger-ts
This library is used to simplify browser-side logging.
Features
Uses
- TypeScript support
- React support
- CSS Modules with PostCSS
- ESLint (with React and Prettier)
- Unit tests (Jest and Testing Library)
- Minified output with Terser
- Bundle size validation with size-limit
- Flexible builds with Rollup
- CHANGELOG.md template
Scripts
- Run most commands:
npm run finish
- Build the project:
npm run build
- Validate output bundle size with
npm run size
- Validate output bundle size with
- Lint the project:
npm run lint
- Run unit tests:
npm test
ornpm test
When developing locally
If you want to test local changes in an actual deployment, use npm link
.
- Run
npm run updateLink
. - Go to client directory and run
npm link promoted-event-logger-ts
.
When you update promoted-event-logger-ts
, run npm run updateLink
.
When you want to undo, use npm unlink
in promoted-event-logger-ts/dist
and npm unlink promoted-event-logger-ts
in the client directory.
Deploy
We use a GitHub action that runs semantic-release to determine how to update versions. Just do a normal code review and this should work. Depending on the message prefixes (e.g. feat:
, fix:
, clean:
, docs:
), it'll update the version appropriately.
Resources
The base of this repository is a combination of the following repos: