Skip to content

Pattern Links in "view all" ignore configured outputFilePaths #437

Closed
@geoffp

Description

@geoffp

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions