Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit c805814

Browse files
author
Erin Altenhof-Long
committed
style(CONTRIBUTING.md): start contributing guidelines for ngHint
Closes #19
1 parent 889fb3f commit c805814

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Contributing Guidelines
2+
-----------------------
3+
4+
Angular-Hint is designed to be a modular tool. This way, independent Angular-Hint modules can be developed as standalone projects and later included in the overall Angular-Hint collection. We hope this will encourage you to develop your own Angular-Hint modules.
5+
6+
The following descriptions detail how an Angular-Hint module should be developed in order to integrate it with the overall design.
7+
8+
Angular-Hint Conventions
9+
------------------------
10+
11+
1. Module Definition
12+
13+
The Angular-Hint module should be named in the format of `ngHintModuleName` when it is defined. For example:
14+
15+
```javascript
16+
angular.module('ngHintControllers', [])
17+
```
18+
The module should be defined in a file called hint-module-name.js.
19+
For example:
20+
21+
```javascript
22+
hint-controllers.js
23+
```
24+
It should have a corresponding test file `hint-module-name_test.js`.
25+
26+
Preferably module names should consist of one descriptive word. If a one word description is too vague to convey the scope of the module, the shortest expression possible is preferred.
27+
28+
2. Module Dependencies
29+
30+
Each Angular-Hint module should load its own dependencies using `browserify`. For instance, `ngHintDom` depends on the library `domInterceptor`. This dependency is included within `ngHintDom` by the browserify `require` function.
31+
32+
All ngHint modules should load ngHintLog as a dependency, see #3.
33+
34+
3. Message Logging
35+
36+
All ngHint modules should use ngHintLog to log warnings. This creates a standard look and feel for all Angular-Hint messages.
37+
38+
To use ngHintLog, see its [README.md](https://github.com/angular/angular-hint-log#angular-hint-log).
39+
40+
4. Module Loading
41+
42+
To be included in AngularHint, an ngHintModule needs to be included in the `allModules` list in `hint.js`. Submit a PR request updating this array as well as the package.json dependency of your ngHint module to this repository to allow your ngHint module to be loaded using the `ng-hint` directives.

0 commit comments

Comments
 (0)