A low-level engine to manage notifications.
Notifier is a low-level engine to create and manage your app notifications. It's supposed to be used on the frontend, but you're not limited by the platform anyway.
This repository is a monorepo containing the following packages:
@notifierjs/core
— platform and framework agnostic engine that helps you build your own notifications system@notifierjs/react
—@notifierjs/core
binding forreact
Check live demo
Check out examples
folder for more usage examples.
Detailed release notes for a given version can be found on a releases page.
This project uses yarn v1
package manager, please make
sure you have it installed and ready to use.
This project uses commitizen
please use the
cm
script to run it.
List of available scripts to run from the project root:
add:root
— add dependency to the project rootpackage.json
lint
— lint all files witheslint
lint:fix
— fix all problematic files witheslint
cm
— launch commit workflow withcommitizen
package:core
— launch any command from the@notifierjs/core
package rootpackage:react
— launch any command from the@notifierjs/react
package root
pre-commit hooks set up thanks to sudo-suhas and his lint-staged-multi-pkg project repo
helpful lerna
options:
https://github.com/lerna/lerna/tree/main/core/global-options#--concurrency
https://github.com/lerna/lerna/tree/main/core/filter-options#--since-ref
husky
is installed in the root package.json
as recommended in
husky docs.
The pre-commit hook is configured with the script
yarn lerna run --concurrency 1 --stream precommit --since HEAD --exclude-dependents
in the .husky/pre-commit
file
This executes the precommit
script for each package (if it exists). Execution is
limited to only those packages with modified files, however the
--since HEAD --exclude-dependents
option does not consider whether
the file is staged. To further limit precommit
to only staged files please
look at the discussion in
sudo-suhas/lint-staged-multi-pkg#4.
Furthermore, concurrent execution is disabled because it can cause problems
during git add
(see okonet/lint-staged#225).
Each package has its own lint-staged
config file and precommit
script which is
triggered by lerna
.