documentary
Advanced tools
Comparing version 1.35.1 to 1.35.2
@@ -257,11 +257,3 @@ const { Replaceable, makeMarkers, makeCutRule, makePasteRule } = require('../../stdlib'); | ||
// update imports | ||
const imports = this._typedefs.types.filter(({ import: i }) => i) | ||
this._typedefs.included.forEach(({ description, fullName: k, link, icon, iconAlt }) => { | ||
const i = imports.find(({ fullName }) => fullName == k) | ||
if (!i) return | ||
if (!i.link) i.link = link | ||
if (!i.description) i.description = description | ||
if (!i.icon) i.icon = icon | ||
if (!i.iconAlt) i.iconAlt = iconAlt | ||
}) | ||
this._typedefs.updateImports() | ||
} | ||
@@ -268,0 +260,0 @@ } |
@@ -46,3 +46,3 @@ const { Replaceable, replace } = require('../../stdlib'); | ||
if (recordOriginalNs) { | ||
const { types: types2 } = parseFile(xml) | ||
const { types: types2 } = parseFile(xml, null, location) | ||
types2.forEach(({ ns }, i) => { | ||
@@ -130,3 +130,19 @@ types[i].originalNs = ns | ||
} | ||
log() { | ||
updateImports() { | ||
if (this._importsUpdated) return | ||
const imports = this.types.filter(({ import: i }) => i) | ||
const included = this.included.filter(({ description, fullName: k, link, icon, iconAlt }) => { | ||
const ii = imports.filter(({ fullName }) => fullName == k) | ||
ii.forEach((i) => { | ||
if (!i.link) i.link = link | ||
if (!i.description) i.description = description | ||
if (!i.icon) i.icon = icon | ||
if (!i.iconAlt) i.iconAlt = iconAlt | ||
}) | ||
return !ii.length | ||
}) | ||
this.included = included | ||
this._importsUpdated = true | ||
} | ||
get log() { | ||
if (/doc/.test(process.env.NODE_DEBUG)) return console.error | ||
@@ -133,0 +149,0 @@ return () => {} |
## 19 December 2019 | ||
### [1.35.2](https://github.com/artdecocode/documentary/compare/v1.35.1...v1.35.2) | ||
- [fix] Don't override imports' descriptions and links. | ||
### [1.35.1](https://github.com/artdecocode/documentary/compare/v1.35.0...v1.35.1) | ||
@@ -4,0 +8,0 @@ |
{ | ||
"name": "documentary", | ||
"version": "1.35.1", | ||
"version": "1.35.2", | ||
"description": "Documentation Compiler To Generate The Table Of Contents, Embed Examples With Their Output, Make Markdown Tables, Maintain Typedefs For JavaScript And README, Watch Changes To Push, Use Macros And Prettify API Titles.", | ||
@@ -5,0 +5,0 @@ "main": "build", |
@@ -283,2 +283,8 @@ Documentary | ||
<tr> | ||
<td>--annotate</td> | ||
<td>-a</td> | ||
<td>Place resolved URLs to all documented types into the | ||
<code>typedefs.json</code> file and reference it in <code>package.json</code>.</td> | ||
</tr> | ||
<tr> | ||
<td>--generate</td> | ||
@@ -285,0 +291,0 @@ <td>-g</td> |
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
460563
5028
383