Tutorial: standards

standards

These are the standards that should be used when coding for this project.

  • Code:
    • Check with ESlint
    • Follow google guide,
    • No variables or functions should be defined in the global namespace, all should be in the dwv var,
    • Favour function expression (a=function()) rather than function declaration (function a()), see link. It allows to put them in the global dwv object,
    • Use design patterns from dofactory and addyosmani
  • Test: use of QUnit via Karma,
  • Documentation: use of jsdoc,
  • Versioning: Semantic Versioning
  • Branch: try to follow some kind of branching model

These standards are enforced using Continuous Integration with github-actions: builds using node (see .github/workflows/nodejs-ci.yml) and yarn. The CI basically executes yarn install that reads the package.json file and then runs yarn run test. This test target is configured to run a task runner called Grunt which is configured with the Gruntfile.js file. The package.json file contains shortcuts to grunt scripts:

Others

Services

Others:

Generic