Skip to content

Commit be75e8f

Browse files
committed
chore: slightly adapt the documentation
1 parent ccce03c commit be75e8f

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

packages/extensions/README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ You can either create a new repository or start from this one to build your Dira
102102

103103
See the [OIDC library documentation](https://github.com/AxaFrance/oidc-client/tree/main/packages/react-oidc#getting-started) for more information.
104104

105+
Note: for backendless local development, replace the `dev` command by:
106+
107+
```json
108+
"scripts": {
109+
"dev": "export NEXT_PUBLIC_DIRACX_URL=$DIRACX_URL; next dev",
110+
...
111+
}
112+
```
113+
114+
This avoids having to set 2 environment variables with the same value: NextJS can only read from variables prefixed with `NEXT_PUBLIC`.
115+
105116
4. **Edit the Next.js config** with these options:
106117

107118
```js
@@ -214,15 +225,13 @@ It can be automatically deployed using CI/CD tools like GitHub Actions, GitLab C
214225
- **Code Quality**: Ensure your code is clean, well-documented, and follows best practices. Use tools like [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/) to maintain code quality.
215226

216227
- **Testing**:
217-
218228
- **Component Testing**: Write tests for your components to ensure they work as expected. Use [Jest](https://jestjs.io/) for unit testing and snapshot testing of your React components.
219229
- **Application Testing**: Use [Cypress](https://www.cypress.io/) for end-to-end testing to simulate real user interactions and ensure your application behaves correctly.
220230
- **Test Coverage**: Maintain good test coverage to ensure that your critical features are well-protected during updates. Tools like Jest provide [coverage reports](https://jestjs.io/docs/code-coverage) that help you identify untested parts of your code.
221231

222232
- **Accessibility**: Make your extension accessible to all users. Use semantic HTML, ARIA attributes, and test your extension with different screen sizes and assistive technologies.
223233

224234
- **Security**:
225-
226235
- **Dependency Management**: Keeping dependencies up to date is crucial for security and performance. Using deprecated packages can expose your application to known vulnerabilities.
227236
- **Identifying Vulnerabilities**: Regularly check for known vulnerabilities in your dependencies. Tools like [`npm audit`](https://docs.npmjs.com/cli/v7/commands/npm-audit) can help spot these issues.
228237
- **Automating Updates**: Use tools like [Dependabot](https://github.com/dependabot) or [Renovate](https://www.whitesourcesoftware.com/free-developer-tools/renovate/) to automate dependency updates. These tools can automatically create pull requests to update dependencies, making it easier to stay current and see if updates are compatible with tests used in CI. Keeping dependencies up to date is crucial for security as deprecated packages can expose your application to known vulnerabilities.

0 commit comments

Comments
 (0)