Closed
Description
I am using Pattern Lab Node v2.4.2
on Mac
, with Node v4.4.7
, using the Gulp
Edition.
Expected Behavior
When using the following config, which supports the use of Underscore templates:
"outputFileSuffixes": {
"rendered": "-rendered",
"rawTemplate": "",
"markupOnly": "-markupOnly"
}
The pattern links in "View All" should end in "-rendered.html".
Actual Behavior
They end in ".html", and in this configuration, that gets you the rawTemplate version and breaks navigation due to the absence of essential scripts on the page in the iframe.
This appears to be due to widespread use of the precomputed patternLink value on Pattern objects. I propose to eliminate this field and replace it with a getPatternLink() method that takes the patternlab object as an argument so it can calculate the correct value on the fly based on the user's config.