First, ensure you have the latest npm
.
To get started with the repository:
git clone https://github.com/AxaGuilDEv/react-oidc.git
cd react-oidc
npm install
npm run bootstrap
Demo of how the component is used.
# Demo using redux as state management
$ npm run example:redux
# Demo using new react context as state management
$ npm run example:context
# Demo in pure vanilla js
$ npm run example:vanilla
To link your developments with the examples
In an other command window :
$ npm run dev:js
$ npm test
# watch for changes
$ npm test -- --watch
# For a specific file (e.g., in packages/context/__tests__/command.test.js)
$ npm test -- --watch packages/context
By default, npm test
also runs the linter.
You can skip this by calling jest
directly:
$ npx jest
$ npx jest --watch
$ npx jest --config jest.config.js
# etc
$ npm run lint
It's also a good idea to hook up your editor to an eslint plugin.
To fix lint errors from the command line:
$ npm run lint -- --fix
If you would like to check test coverage, run the coverage script, then open
coverage/lcov-report/index.html
in your favorite browser.
$ npm test -- --coverage
# OS X
$ open coverage/lcov-report/index.html
# Linux
$ xdg-open coverage/lcov-report/index.html
Please respect the following PULL_REQUEST_TEMPLATE.md
Please respect the following ISSUE_TEMPLATE.md