dgeni-packages
Advanced tools
Comparing version 0.6.0 to 0.7.0
@@ -0,1 +1,9 @@ | ||
## v0.7.0 03/11/2014 | ||
**New Features** | ||
* feat(TagCollection): add an array of Tags via the constructor 7c1cca1a | ||
* feat(jsdoc/tag-defs): add deprecated tag 0f3a1949 | ||
* feat(examples-generate): create manifest.json file for Plunker 1849ec49 | ||
## v0.6.0 03/07/2014 | ||
@@ -2,0 +10,0 @@ |
@@ -79,2 +79,24 @@ var _ = require('lodash'); | ||
function createManifestDoc(example) { | ||
var files = _(example.files) | ||
.omit('index.html') | ||
.map(function(file) { | ||
return file.name; | ||
}) | ||
.value(); | ||
var manifestDoc = { | ||
id: example.id + '-manifest', | ||
docType: 'example-manifest', | ||
template: path.join(templateFolder, 'manifest.template.json'), | ||
file: example.doc.file, | ||
startingLine: example.doc.startingLine, | ||
example: example, | ||
files: files, | ||
outputPath: outputPath(example, 'manifest.json') | ||
}; | ||
return manifestDoc; | ||
} | ||
module.exports = { | ||
@@ -133,4 +155,7 @@ name: 'examples-generate', | ||
// Create the manifest that will be sent to Plunker | ||
docs.push(createManifestDoc(example)); | ||
}); | ||
} | ||
}; |
@@ -98,3 +98,10 @@ var plugin = require('../../processors/examples-generate'); | ||
var runnableExampleDocs = _.filter(docs, { docType: 'runnableExample' }); | ||
expect(runnableExampleDocs.length).toEqual(1); | ||
}); | ||
it("should add a manifest doc for each example", function() { | ||
var manifestDocs = _.filter(docs, { docType: 'example-manifest' }); | ||
expect(manifestDocs.length).toEqual(1); | ||
}); | ||
}); |
@@ -6,3 +6,3 @@ var _ = require('lodash'); | ||
*/ | ||
var TagCollection = function() { | ||
var TagCollection = function(tags) { | ||
this.tags = []; | ||
@@ -12,2 +12,6 @@ this.tagsByName = Object.create(null); | ||
this.description = ''; | ||
_.forEach(tags, function(tag) { | ||
this.addTag(tag); | ||
}, this); | ||
}; | ||
@@ -14,0 +18,0 @@ |
@@ -18,2 +18,9 @@ var TagCollection = require('../../lib/TagCollection'); | ||
it("should add the tags provided to the constructor", function() { | ||
spyOn(TagCollection.prototype, 'addTag'); | ||
new TagCollection([{}, {}, {}]); | ||
expect(TagCollection.prototype.addTag).toHaveBeenCalled(); | ||
expect(TagCollection.prototype.addTag.calls.length).toEqual(3); | ||
}); | ||
describe("addTag", function() { | ||
@@ -20,0 +27,0 @@ it("should add a good tag to the tags and tagsByName properties", function() { |
@@ -66,2 +66,3 @@ var checkProperty = require('dgeni/lib/utils/check-property'); | ||
{ name: 'description' }, | ||
{ name: 'deprecated' }, | ||
{ name: 'private' }, | ||
@@ -68,0 +69,0 @@ { name: 'see'}, |
{ | ||
"name": "dgeni-packages", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"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
AI-detected potential security risk
Supply chain riskAI has determined that this package may contain potential security issues or vulnerabilities.
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
169959
121
3823
7