iddm-ui
There is no IDE dependency, any IDE or text editor can be used. But VS Code is recommended due to various plugins that can improve and simplify development. The following plugins are recommended
To enable import sorting on save in VS Code, add the following to your VS Code
settings.jsonfile
{
"editor.codeActionsOnSave": {
"source.fixAll": true,
"source.organizeImports": true,
"source.sortMembers": true
}
}
You can use Git Prefix to pull the ticket number from your branch and it insert it into your commit message to make it easier to track commits to tickets. Add the following to your
settings.jsonfile to have it pull the correct ticket number and insert it when you click the git prefix button.
"gitPrefix.pattern": ".*(RO-\\d+).*",
This project is currently compatible with LTS node v20.11.1 (npm v10.2.4). Ensure you are using the same node version first prior to executing any npm commands to avoid compiliation errors.
npm install
this will also run the postinstall after the instillation is finished to generate the Chakra theme types
npm start
Runs the app in development mode. Open http://localhost:3000 to view it in the browser. Uses dev configurations by running gen:config-dev on pre-start
npm test
Runs all tests.
npm run test:watch
Runs the test watcher in an interactive mode.
npm run cypress:run
npm run cypress:runqa --password='QA NETLIFY PW'
npm run cypress:runprod --password='PROD NETLIFY PW'
Runs all cypress tests in command line on the chosen environment. "run" defaults to localhost.
npm run cypress:open
npm run cypress:openqa --password='QA NETLIFY PW'
npm run cypress:openprod --password='PROD NETLIFY PW'
Opens a Cypress instance in the browser for the chosen environment.
In order to report the test results to TestRail, make sure to add the following file "cypress.env.json" with the following details
{
"testrail": {
"domain": "",
"username": "",
"password": "",
"screenshots": false,
"projectId": "",
"milestoneId": "",
"suiteId": "",
"runId": ,
"runName": "",
"runIncludeAll": true,
"closeRun": true
}
}
npm run eslint
Runs ESLint for TS and React/TSX
npm run build
Builds the app for production to the build folder. Bundles React in production mode and optimizes the build for the best performance. Uses prod configurations by running gen:config-prod on pre-build
The build is minified and the filenames include the hashes and is ready to be deployed.
npm run build:test
As above but uses QA configurations by running react-scripts:qa on pre-build
npm run test:ci
sets the CI environment variable to true and runs tests in a non-iterative mode
Git hooks are setup with Husky to prevent bad git commits and pushes. Currently configured to run lint for TS/TSX before a commit can be staged and configured to run tests before commits can be pushed
├── docs (additional markdown documentation for the project)
├── public (html file, script tag with compiled code will be added automatically during build process)
├── src (all source code and assets)
├── api (code for making api calls, includes api client, hooks, scheme models, and utility functions)
├── assets (icons and logos)
├── components (react components)
├── common (common react components)
├── forms (common form components)
├── layout (page layout react components)
├── pages (page/feature components)
├── config (environment configurations)
├── hooks (global react hooks)
├── locales (localized strings)
├── types (global types)
├── utils (non-hook utility functions)
Each sub-folder under src should include a __tests__ folder for all unit tests. There should be separate test file for each corresponding source file and be named as name.spec.extension, for example, Body.spec.tsx
Documented rules and reasoning
Additional documentation on specific features and best practices, see docs folder
Content type
Image
Digest
sha256:a290d479b…
Size
65.1 MB
Last updated
6 days ago
docker pull radiantone/iddm-ui:8.4.5