grunt-ngdocs
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -0,1 +1,33 @@ | ||
# 0.1.3 (2013-07-19) | ||
## Features | ||
### ngdocs | ||
* `@param` support for object properties ([5e3c402c](https://github.com/m7r/grunt-ngdocs/commit/5e3c402c)) | ||
@param {Object} param Some obj | ||
@param {String} param.name some name on the obj | ||
Object properties are not included in the method signature | ||
* support custom items with `@requires` ([d0f488c2](https://github.com/m7r/grunt-ngdocs/commit/d0f488c2)) | ||
`@requires $cookie` => `$cookie` href = currentsection/ng.$cookie | ||
`@requires module.directive:tabs` => `tabs` href = currentsection/module.directive:tabs | ||
`@requires /section2/module.directive:tabs` => `tabs` href = section2/module.directive:tabs | ||
## Bug fixes | ||
### ngdocs | ||
* make `@methodOf` work in all sections #21 ([468904ab](https://github.com/m7r/grunt-ngdocs/commit/468904ab)) | ||
### task | ||
* make backward compatible to 0.1.1 ([64f656ff](https://github.com/m7r/grunt-ngdocs/commit/64f656ff)) | ||
# 0.1.2 (2013-06-27) | ||
@@ -2,0 +34,0 @@ |
{ | ||
"name": "grunt-ngdocs", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "grunt plugin for angularjs documentation", | ||
@@ -5,0 +5,0 @@ "main": "tasks", |
@@ -99,3 +99,3 @@ /** | ||
if (url.substr(-1) == '/') return url + 'index'; | ||
if (url.match(/\//)) return url; | ||
if (url.match(/\//)) return prefix + url; | ||
return prefix + this.section + '/' + url; | ||
@@ -276,2 +276,9 @@ }, | ||
}; | ||
//if param name is a part of an object passed to a method | ||
//mark it, so it's not included in the rendering later | ||
if(param.name.indexOf(".") > 0){ | ||
param.isProperty = true; | ||
} | ||
self.param.push(param); | ||
@@ -328,3 +335,5 @@ } else if (atName == 'returns' || atName == 'return') { | ||
dom.tag('code', function() { | ||
dom.tag('a', {href: 'api/ng.' + require.name}, require.name); | ||
var id = /[\.\/]/.test(require.name) ? require.name : 'ng.' + require.name, | ||
name = require.name.split(/[\.:#\/]/).pop(); | ||
dom.tag('a', {href: self.convertUrlToAbsolute(id)}, name); | ||
}); | ||
@@ -675,3 +684,5 @@ dom.html(require.text); | ||
dom.h('Methods', self.methods, function(method){ | ||
var signature = (method.param || []).map(property('name')); | ||
//filters out .IsProperty parameters from the method signature | ||
var signature = (method.param || []).filter(function(e) { return e.isProperty !== true}).map(property('name')); | ||
dom.h(method.shortName + '(' + signature.join(', ') + ')', method, function() { | ||
@@ -1020,3 +1031,3 @@ dom.html(method.description); | ||
var parent = byFullId['api/' + parentName]; | ||
var parent = byFullId[doc.section + '/' + parentName]; | ||
if (!parent) | ||
@@ -1023,0 +1034,0 @@ throw new Error("No parent named '" + parentName + "' for '" + |
@@ -117,2 +117,3 @@ /* | ||
setup = context.NG_DOCS; | ||
setup.apis = setup.apis || {}; // make backward compatible to 0.1.1, remove in 0.2.0 | ||
// keep only pages from other build tasks | ||
@@ -119,0 +120,0 @@ setup.pages = _.filter(setup.pages, function(p) {return p.section !== section;}); |
694331
9216