Skip to content

Commit bdf6de3

Browse files
committed
Switched documentation to docular.
1 parent b7afe12 commit bdf6de3

File tree

8 files changed

+256
-191
lines changed

8 files changed

+256
-191
lines changed

Gruntfile.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = function(grunt) {
66
grunt.loadNpmTasks('grunt-contrib-concat');
77
grunt.loadNpmTasks('grunt-contrib-uglify');
88
grunt.loadNpmTasks('grunt-karma');
9-
grunt.loadNpmTasks('grunt-jsdoc');
9+
grunt.loadNpmTasks('grunt-docular');
1010

1111
// Project configuration.
1212
grunt.initConfig({
@@ -79,20 +79,30 @@ module.exports = function(grunt) {
7979
browsers: ['PhantomJS']
8080
}
8181
},
82-
jsdoc : {
83-
compile: {
84-
src: ['README.md', '<%= dirs.src %>'],
85-
options: {
86-
destination: '<%= dirs.dest %>/docs',
87-
configure: 'jsdoc/conf.json',
88-
template: 'jsdoc/template'
82+
docular : {
83+
groups: [
84+
{
85+
groupTitle: 'AngularGM Docs',
86+
groupId: 'angulargm',
87+
groupIcon: 'icon-map-marker',
88+
sections: [
89+
{
90+
id: "api",
91+
title: "AngularGM API",
92+
scripts: [
93+
"src/",
94+
]
95+
}
96+
]
8997
}
90-
}
98+
],
99+
showDocularDocs: false,
100+
showAngularDocs: false
91101
}
92102
});
93103

94104
grunt.registerTask('default', ['build']);
95105

96-
grunt.registerTask('build', ['jshint', 'karma:unit', 'concat', 'uglify', 'jsdoc']);
106+
grunt.registerTask('build', ['jshint', 'karma:unit', 'concat', 'uglify', 'docular']);
97107

98108
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"karma-requirejs": "~0.1.0",
3030
"karma-coffee-preprocessor": "~0.1.0",
3131
"karma": "~0.10.1",
32-
"karma-coverage": "~0.1.0"
32+
"karma-coverage": "~0.1.0",
33+
"grunt-docular": "~0.1.1"
3334
}
3435
}

src/directives/gmInfoWindow.js

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
'use strict';
22

33
/**
4+
* @ngdoc directive
5+
* @name angulargm.directive:gmInfoWindow
6+
* @element ANY
7+
*
8+
* @description
49
* A directive for creating a google.maps.InfoWindow.
510
*
6-
* Usage:
7-
* ```html
8-
* <div gm-info-window="myInfoWindow"
9-
* gm-info-window-options="myInfoWindowOptions"
10-
* gm-on-*event*="myEventHandler">
11-
* </div>
12-
* ```
13-
*
14-
* + `gm-info-window`: name of scope variable to store the
15-
* google.maps.InfoWindow in. Does not have to already exist.
11+
* + @param {string} gm-info-window name of scope variable to store the
12+
* [google.maps.InfoWindow](https://developers.google.com/maps/documentation/javascript/reference#InfoWindow)
13+
* in. Does not have to already exist.
1614
*
17-
* + `gm-info-window-options`: object in the current scope that is a
18-
* google.maps.InfoWindowOptions object. If unspecified, google maps api
19-
* defaults will be used.
15+
* + @param {expression} gm-info-window-options object in the current scope
16+
* that is a
17+
* [google.maps.InfoWindowOptions](https://developers.google.com/maps/documentation/javascript/reference#InfoWindowOptions)
18+
* object. If unspecified, google maps api defaults will be used.
2019
*
21-
* + `gm-on-*event*`: an angular expression which evaluates to an event
22-
* handler. This handler will be attached to the InfoWindow's \*event\*
23-
* event. The variable 'infoWindow' evaluates to the InfoWindow. For
24-
* example: `gm-on-closeclick="myCloseclickFn(infoWindow)"` will call your
25-
* myCloseclickFn whenever the InfoWindow is clicked closed. You may have
26-
* multiple `gm-on-*event*` handlers, but only one for each type of event.
20+
* + @param {expression} gm-on-*event* an angular expression which evaluates to an
21+
* event handler. This handler will be attached to the InfoWindow's \*event\*
22+
* event. The variable `infoWindow` evaluates to the InfoWindow. For example:
23+
* ```html
24+
* gm-on-closeclick="myCloseclickFn(infoWindow)"
25+
* ```
26+
* will call your myCloseclickFn whenever the InfoWindow is clicked closed. You
27+
* may have multiple `gm-on-*event*` handlers, but only one for each type of
28+
* event.
2729
*
2830
* @module gmInfoWindow
2931
*/

src/directives/gmMap.js

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,64 @@
11
'use strict';
22

33
/**
4+
* @ngdoc directive
5+
* @name angulargm.directive:gmMap
6+
* @element ANY
7+
*
8+
* @description
49
* A directive for embedding google maps into your app.
510
*
6-
* Usage:
7-
* ```html
8-
* <gm-map gm-map-id="myMapId"
9-
* gm-center="myCenter"
10-
* gm-zoom="myZoom"
11-
* gm-bounds="myBounds"
12-
* gm-map-type-id="myMapTypeId"
13-
* gm-map-options="myMapOptions">
14-
* </gm-map>
15-
* ```
11+
* `gm-map-id` is required. The `gm-center`, `gm-zoom`, `gm-bounds`, and
12+
* `gm-map-type-id` variables do not have to exist in the current scope--they
13+
* will be created if necessary. All three have bi-directional association,
14+
* i.e. drag or zoom the map and they will update, update them and the map
15+
* will change. However, any initial state of these three variables will be
16+
* ignored.
1617
*
17-
* + `gm-map-id`: angular expression that evaluates to a unique string id for
18-
* the map, e.g. "'map_canvas'" or "myMapId" where myMapId is a variable in
19-
* the current scope. This allows you to have multiple maps/instances of the
20-
* directive.
18+
* If you need to get a handle on the google.maps.Map object, see
19+
* [angulargmContainer]
2120
*
22-
* + `gm-center`: name for a center variable in the current scope. The value
23-
* will be a google.maps.LatLng object.
21+
* @param {expression} gm-map-id angular expression that evaluates to a unique
22+
* string id for the map, e.g. `'map_canvas'` or `myMapId` where myMapId is a
23+
* variable in the current scope. This allows you to have multiple
24+
* maps/instances of the directive.
2425
*
25-
* + `gm-zoom`: name for a zoom variable in the current scope. Value will be
26-
* an integer.
2726
*
28-
* + `gm-bounds`: name for a bounds variable in the current scope. Value will
29-
* be a google.maps.LatLngBounds object.
27+
* @param {string} gm-center name for a center variable in the current scope.
28+
* The value will be a google.maps.LatLng object.
3029
*
31-
* + `gm-map-type-id`: name for a mapTypeId variable in the current scope.
32-
* Value will be a string.
3330
*
34-
* + `gm-map-options`: object in the current scope that is a
35-
* google.maps.MapOptions object. If unspecified, will use the values in
36-
* angulargmDefaults.mapOptions. [angulargmDefaults]{@link module:angulargmDefaults}
37-
* is a service, so it is both injectable and overrideable (using
38-
* $provide.decorator).
31+
* @param {string} gm-zoom name for a zoom variable in the current scope.
32+
* Value will be an integer.
3933
*
40-
* All attributes except `gm-map-options` are required. The `gm-center`,
41-
* `gm-zoom`, `gm-bounds`, and `gm-map-type-id` variables do not have to exist in
42-
* the current scope--they will be created if necessary. All three have
43-
* bi-directional association, i.e. drag or zoom the map and they will update,
44-
* update them and the map will change. However, any initial state of these
45-
* three variables will be ignored.
4634
*
47-
* If you need to get a handle on the google.maps.Map object, see
48-
* [angulargmContainer]{@link module:angulargmContainer}
35+
* @param {string} gm-bounds name for a bounds variable in the current scope.
36+
* Value will be a google.maps.LatLngBounds object.
4937
*
50-
* Events:
5138
*
52-
* + `gmMapResize`: google.maps.event.trigger(map, 'resize') To use:
53-
* `$scope.$broadcast('gmMapResize', 'myMapId')`
39+
* @param {string} gm-map-type-id name for a mapTypeId variable in the current
40+
* scope. Value will be a string.
5441
*
55-
* Parameters:
5642
*
57-
* + `mapId`: required. The id of your map. This is what you set
58-
* `gm-map-id` to. It is necessary because there may be multiple
59-
* instances of the `gmMap` directive.
43+
* @param {expression} gm-map-options object in the current scope that is a
44+
* google.maps.MapOptions object. If unspecified, will use the values in
45+
* angulargmDefaults.mapOptions. [angulargmDefaults] is a service, so it is
46+
* both injectable and overrideable (using $provide.decorator).
6047
*
61-
* @module gmMap
6248
*/
49+
50+
/**
51+
* @ngdoc event
52+
* @name angulargm.directive:gmMap#gmMapResize
53+
* @eventOf angulargm.directive:gmMap
54+
* @eventType listen on current gmMap scope
55+
* @param {string} mapId Required. The id of your map.
56+
* @example
57+
* ```js
58+
* $scope.$broadcast('gmMapResize', 'myMapId')
59+
* ```
60+
*/
61+
6362
(function () {
6463
angular.module('AngularGM').
6564

0 commit comments

Comments
 (0)