This document describes development environment for the WebUi
Framework and projects depending on it. It also provides good practices which developers are encouraged to follow.
Source code should be covered by unit tests and/or integration tests. The following test utilities are used in the project:
The source code of unit tests is kept in Backend/test/
and Frontend/test/
directories. The filename should prefixed with mocha-
.
The project uses ESLint to validate JavaScript syntax and coding style. The rules are defined in .eslint
file and follow O2 JavaScript Coding Guideline.
Exceptions can be added to lines and files:
/* eslint max-len: 0 */
removes maximum length for current file/* eslint-disable */
removes eslint from current file// eslint-disable-next-line
removes eslint from next line// eslint-disable-next-line max-len
removes eslint maximum length from next lineNodemon provides convenient development cycle server by restarting server after source code modification modification. Browser page can be refreshed with CTRL+R or CMD+R.
npm scripts are used to automate tasks:
npm start
starts the server in productionnpm run dev
starts server in watch mode (nodemon enable)npm run eslint
runs linternpm run mocha
starts front-end and back-end unit testsnpm run test
runs both: npm run mocha
and npm run eslint
ubuntu
macOS
The status of the dependencies can be shown by running ncu
command of npm-check-updates package.
Instanbul module together with codecov service are used to generate coverage reports of nodejs unit tests.
Github is used for managing sources and npm for releases.
npm run dev
Set “Fix version” of each JIRA issue that is being released, as we host multiple packages in the repo use npm naming conventions: <org>/<package>@<version>
(this may have been already done when creating an issue or at later stage)
If all the issues for the given release are in the “Ready for release” status start the process:
package.json
) version, either manually or using npm version
script, create “release” PR against dev
, merge<org>/<package>@<version>
), generate “Release Notes” from JIRA and add them to release description. Our release workflow will automatically release it to NPM and if the project is QualityControl
it will also raise a PR in alisw/alidist bumping the qcg.sh
recipe with the new version and tag.