Skip to content

Latest commit

 

History

History
executable file
·
28 lines (17 loc) · 1.19 KB

js-guidelines.md

File metadata and controls

executable file
·
28 lines (17 loc) · 1.19 KB

Javacript guidelines

Content

  1. File structure
  2. Comments

1. File structure

Admin

To extend the admin create a new Angular module or app and place it in web/apps/.

Enable the module or app by adding them to app/config/modules.yml or app/config/apps.yml. Each file that should be loaded should be added to these files.

2. Comments

Inline documentation for source files should follow the Doxygen formatting conventions.

Non-documentation comments are strongly encouraged. A general rule of thumb is that if you look at a section of code and think "Wow, I don't want to try and describe that", you need to comment it before you forget how it works. Comments can be removed by JS compression utilities later, so they don't negatively impact on the file download size.

Non-documentation comments should use capitalized sentences with punctuation. All caps are used in comments only when referencing constants, e.g., TRUE. Comments should be on a separate line immediately before the code line or block they reference

// Unselect all other checkboxes.