-
Notifications
You must be signed in to change notification settings - Fork 875
chore: fix "Invalid example" warnings from shred map builder #1832
Conversation
@Foxandxss @wardbell @kwalrath : ready for review. Here are the ngio docs related warnings:
And here are the ng API doc example warnings (that were repeated for TS):
The latter have been fixed via angular/angular#9828. |
So this fix the two ToH issues with fragments? Those are fine on the .jade. |
Yes it fixes the toh fragment issues. And you are correct: those were fine in the rendered site HTML. The problem arose in the fragment cross referencer which Ward said we will likely be using once again in the future (cf. this comment). |
aca962e
to
89768f5
Compare
var fullFragPath = path.join(options.fragmentsDir, fragPath); | ||
|
||
var fragInfo = { fragPath: fullFragPath, examplePath: fullExamplePath, exists: fs.existsSync(fullFragPath) }; | ||
var fragInfo = makeFragInfo(options.fragmentsDir, fullExamplePath, fragItem, mixinPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what the consequences of this (and similar changes) are for the way we write examples in Jade?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has no impact on how we write the Jade, but it allows the shred xref mapper to make sense of the abbreviated makeExample
source paths like:
+makeExample('app/hero.service.ts')
vs the original long form:
+makeExample('router/ts/app/main.1.ts','all', 'main.ts')(format=".")
Does that answer your question?
The shred map (xref) builder was issuing warnings. This fix includes - Adjustments to the shredder map builder itself so that it understands, e.g., app-project relative example paths. - `**/guide/glossary.jade` now (Jade) `includes` the shared parent `glossary.jade` rather than (Harp) importing (via `partial`). This fixes `makeExample` path issues in the glossary. - Adjusted some `makeExample` paths that were ok for site build, but confused the xref tool.
89768f5
to
984ee41
Compare
Merged |
The shred map (xref) builder was issuing warnings. This fix includes
understands, e.g., app-project relative example paths.
**/guide/glossary.jade
now (Jade)includes
the shared parentglossary.jade
rather than (Harp) importing (viapartial
). Thisfixes
makeExample
path issues in the glossary.makeExample
paths that were ok for site build, butconfused the xref tool.