You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2025. It is now read-only.
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