dgeni-packages
Advanced tools
Comparing version 0.9.4 to 0.9.5
@@ -0,3 +1,11 @@ | ||
## v0.9.5 07/17/2014 | ||
* fix(ng-doc/component-groups-generate): allow path/outputPath to be configurable 48d105bc | ||
* Revert "fix(ng-doc/component-groups-generate processor): use path/outputPath specified in process... 71ced7dd | ||
## v0.9.4 07/17/2014 | ||
** WARNING - this release had an invalid breaking change. Don't use it ** | ||
* fix(utils/code): encode HTML entities 5091e1c1 | ||
@@ -4,0 +12,0 @@ * fix(ng-doc/component-groups-generate processor): use path/outputPath specified in processing.api-... f2c3776f |
@@ -16,6 +16,6 @@ var _ = require('lodash'); | ||
var apiConfig = config.get('processing.api-docs'); | ||
if ( !apiConfig ) { | ||
throw new Error('Invalid configuration. You must provide config.processing.api-docs'); | ||
} | ||
var options = _.assign({ | ||
outputPath: '${module.area}/${module.name}/${docType}/index.html', | ||
path: '${module.area}/${module.name}/${docType}' | ||
}, config.get('processing.component-groups', {})); | ||
@@ -31,3 +31,2 @@ _.forEach(moduleMap, function(module) { | ||
.map(function(docs, docType) { | ||
var templateParams = { area: module.area, module: module.name, docType: docType, name: 'index'}; | ||
return { | ||
@@ -41,4 +40,4 @@ id: module.id + '.' + docType, | ||
components: docs, | ||
outputPath: path.join(partialsPath, _.template(apiConfig.outputPath, templateParams)), | ||
path: _.template(apiConfig.path, templateParams) | ||
outputPath: path.join(partialsPath, _.template(options.outputPath, { module: module, docType: docType })), | ||
path: _.template(options.path, { module: module, docType: docType }) | ||
}; | ||
@@ -45,0 +44,0 @@ }) |
@@ -6,3 +6,2 @@ var _ = require('lodash'); | ||
describe("component-groups processor", function() { | ||
it("should create a new doc for each group of components (by docType) in each module", function() { | ||
@@ -25,15 +24,9 @@ var docs = []; | ||
config.set('rendering.contentsFolder', 'partials'); | ||
config.set('processing.api-docs', { | ||
outputPath: '${area}/${module}/${docType}/${name}.html', | ||
path: '${area}/${module}/${docType}/${name}' | ||
}); | ||
processor.process(docs, config, modules); | ||
expect(docs.length).toEqual(2); | ||
}); | ||
it("should use the outputPath and path specified in processing.api-docs", function() { | ||
it("should use the outputPath and path specified in processing.component-groups", function() { | ||
var docs = []; | ||
@@ -57,5 +50,5 @@ var modules = [{ | ||
config.set('rendering.contentsFolder', 'partials'); | ||
config.set('processing.api-docs', { | ||
outputPath: '${area}/${module}/${docType}/${name}.html', | ||
path: '${area}/${module}/${docType}/${name}' | ||
config.set('processing.component-groups', { | ||
outputPath: '${module.area}/${module.name}/${docType}/${module.name}.html', | ||
path: '${module.area}/${module.name}/${docType}/${module.name}' | ||
}); | ||
@@ -65,8 +58,5 @@ | ||
expect(docs[0].path).toBe('api-docs/test/a/index'); | ||
expect(docs[0].outputPath).toBe('partials/api-docs/test/a/index.html'); | ||
expect(docs[0].path).toBe('api-docs/test/a/test'); | ||
expect(docs[0].outputPath).toBe('partials/api-docs/test/a/test.html'); | ||
}); | ||
}); |
{ | ||
"name": "dgeni-packages", | ||
"version": "0.9.4", | ||
"version": "0.9.5", | ||
"description": "A collection of dgeni packages for generating documentation from source code", | ||
@@ -5,0 +5,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
216279
0
4480