Skip to content

Commit

Permalink
Switched documentation to docular.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanfprice committed Aug 8, 2013
1 parent b7afe12 commit bdf6de3
Show file tree
Hide file tree
Showing 8 changed files with 256 additions and 191 deletions.
30 changes: 20 additions & 10 deletions Gruntfile.js
Expand Up @@ -6,7 +6,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-docular');

// Project configuration.
grunt.initConfig({
Expand Down Expand Up @@ -79,20 +79,30 @@ module.exports = function(grunt) {
browsers: ['PhantomJS']
}
},
jsdoc : {
compile: {
src: ['README.md', '<%= dirs.src %>'],
options: {
destination: '<%= dirs.dest %>/docs',
configure: 'jsdoc/conf.json',
template: 'jsdoc/template'
docular : {
groups: [
{
groupTitle: 'AngularGM Docs',
groupId: 'angulargm',
groupIcon: 'icon-map-marker',
sections: [
{
id: "api",
title: "AngularGM API",
scripts: [
"src/",
]
}
]
}
}
],
showDocularDocs: false,
showAngularDocs: false
}
});

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

grunt.registerTask('build', ['jshint', 'karma:unit', 'concat', 'uglify', 'jsdoc']);
grunt.registerTask('build', ['jshint', 'karma:unit', 'concat', 'uglify', 'docular']);

};
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -29,6 +29,7 @@
"karma-requirejs": "~0.1.0",
"karma-coffee-preprocessor": "~0.1.0",
"karma": "~0.10.1",
"karma-coverage": "~0.1.0"
"karma-coverage": "~0.1.0",
"grunt-docular": "~0.1.1"
}
}
40 changes: 21 additions & 19 deletions src/directives/gmInfoWindow.js
@@ -1,29 +1,31 @@
'use strict';

/**
* @ngdoc directive
* @name angulargm.directive:gmInfoWindow
* @element ANY
*
* @description
* A directive for creating a google.maps.InfoWindow.
*
* Usage:
* ```html
* <div gm-info-window="myInfoWindow"
* gm-info-window-options="myInfoWindowOptions"
* gm-on-*event*="myEventHandler">
* </div>
* ```
*
* + `gm-info-window`: name of scope variable to store the
* google.maps.InfoWindow in. Does not have to already exist.
* + @param {string} gm-info-window name of scope variable to store the
* [google.maps.InfoWindow](https://developers.google.com/maps/documentation/javascript/reference#InfoWindow)
* in. Does not have to already exist.
*
* + `gm-info-window-options`: object in the current scope that is a
* google.maps.InfoWindowOptions object. If unspecified, google maps api
* defaults will be used.
* + @param {expression} gm-info-window-options object in the current scope
* that is a
* [google.maps.InfoWindowOptions](https://developers.google.com/maps/documentation/javascript/reference#InfoWindowOptions)
* object. If unspecified, google maps api defaults will be used.
*
* + `gm-on-*event*`: an angular expression which evaluates to an event
* handler. This handler will be attached to the InfoWindow's \*event\*
* event. The variable 'infoWindow' evaluates to the InfoWindow. For
* example: `gm-on-closeclick="myCloseclickFn(infoWindow)"` will call your
* myCloseclickFn whenever the InfoWindow is clicked closed. You may have
* multiple `gm-on-*event*` handlers, but only one for each type of event.
* + @param {expression} gm-on-*event* an angular expression which evaluates to an
* event handler. This handler will be attached to the InfoWindow's \*event\*
* event. The variable `infoWindow` evaluates to the InfoWindow. For example:
* ```html
* gm-on-closeclick="myCloseclickFn(infoWindow)"
* ```
* will call your myCloseclickFn whenever the InfoWindow is clicked closed. You
* may have multiple `gm-on-*event*` handlers, but only one for each type of
* event.
*
* @module gmInfoWindow
*/
Expand Down
85 changes: 42 additions & 43 deletions src/directives/gmMap.js
@@ -1,65 +1,64 @@
'use strict';

/**
* @ngdoc directive
* @name angulargm.directive:gmMap
* @element ANY
*
* @description
* A directive for embedding google maps into your app.
*
* Usage:
* ```html
* <gm-map gm-map-id="myMapId"
* gm-center="myCenter"
* gm-zoom="myZoom"
* gm-bounds="myBounds"
* gm-map-type-id="myMapTypeId"
* gm-map-options="myMapOptions">
* </gm-map>
* ```
* `gm-map-id` is required. The `gm-center`, `gm-zoom`, `gm-bounds`, and
* `gm-map-type-id` variables do not have to exist in the current scope--they
* will be created if necessary. All three have bi-directional association,
* i.e. drag or zoom the map and they will update, update them and the map
* will change. However, any initial state of these three variables will be
* ignored.
*
* + `gm-map-id`: angular expression that evaluates to a unique string id for
* the map, e.g. "'map_canvas'" or "myMapId" where myMapId is a variable in
* the current scope. This allows you to have multiple maps/instances of the
* directive.
* If you need to get a handle on the google.maps.Map object, see
* [angulargmContainer]
*
* + `gm-center`: name for a center variable in the current scope. The value
* will be a google.maps.LatLng object.
* @param {expression} gm-map-id angular expression that evaluates to a unique
* string id for the map, e.g. `'map_canvas'` or `myMapId` where myMapId is a
* variable in the current scope. This allows you to have multiple
* maps/instances of the directive.
*
* + `gm-zoom`: name for a zoom variable in the current scope. Value will be
* an integer.
*
* + `gm-bounds`: name for a bounds variable in the current scope. Value will
* be a google.maps.LatLngBounds object.
* @param {string} gm-center name for a center variable in the current scope.
* The value will be a google.maps.LatLng object.
*
* + `gm-map-type-id`: name for a mapTypeId variable in the current scope.
* Value will be a string.
*
* + `gm-map-options`: object in the current scope that is a
* google.maps.MapOptions object. If unspecified, will use the values in
* angulargmDefaults.mapOptions. [angulargmDefaults]{@link module:angulargmDefaults}
* is a service, so it is both injectable and overrideable (using
* $provide.decorator).
* @param {string} gm-zoom name for a zoom variable in the current scope.
* Value will be an integer.
*
* All attributes except `gm-map-options` are required. The `gm-center`,
* `gm-zoom`, `gm-bounds`, and `gm-map-type-id` variables do not have to exist in
* the current scope--they will be created if necessary. All three have
* bi-directional association, i.e. drag or zoom the map and they will update,
* update them and the map will change. However, any initial state of these
* three variables will be ignored.
*
* If you need to get a handle on the google.maps.Map object, see
* [angulargmContainer]{@link module:angulargmContainer}
* @param {string} gm-bounds name for a bounds variable in the current scope.
* Value will be a google.maps.LatLngBounds object.
*
* Events:
*
* + `gmMapResize`: google.maps.event.trigger(map, 'resize') To use:
* `$scope.$broadcast('gmMapResize', 'myMapId')`
* @param {string} gm-map-type-id name for a mapTypeId variable in the current
* scope. Value will be a string.
*
* Parameters:
*
* + `mapId`: required. The id of your map. This is what you set
* `gm-map-id` to. It is necessary because there may be multiple
* instances of the `gmMap` directive.
* @param {expression} gm-map-options object in the current scope that is a
* google.maps.MapOptions object. If unspecified, will use the values in
* angulargmDefaults.mapOptions. [angulargmDefaults] is a service, so it is
* both injectable and overrideable (using $provide.decorator).
*
* @module gmMap
*/

/**
* @ngdoc event
* @name angulargm.directive:gmMap#gmMapResize
* @eventOf angulargm.directive:gmMap
* @eventType listen on current gmMap scope
* @param {string} mapId Required. The id of your map.
* @example
* ```js
* $scope.$broadcast('gmMapResize', 'myMapId')
* ```
*/

(function () {
angular.module('AngularGM').

Expand Down

0 comments on commit bdf6de3

Please sign in to comment.