Skip to content

Commit

Permalink
refactor: we also want the pattern extension to include the full "ext…
Browse files Browse the repository at this point in the history
…ension"
  • Loading branch information
mfranzke committed Dec 28, 2022
1 parent 8e292d9 commit 452ad5e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/core/src/lib/object_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ const Pattern = function (
patternlab?.config?.patternExtension?.includes('.') &&
this.relPath.endsWith('.' + patternlab.config.patternExtension)
) {
this.fileName = path.basename(
this.relPath,
'.' + patternlab.config.patternExtension
); // e.g. 'colors'
this.fileExtension = '.' + patternlab.config.patternExtension; // e.g. '.html.twig'
this.fileName = path.basename(this.relPath, this.fileExtension); // e.g. 'colors'
} else {
this.fileExtension = pathObj.ext; // e.g. '.hbs'
this.fileName = pathObj.name; // e.g. 'colors'
}
this.subdir = pathObj.dir; // 'atoms/global'
this.fileExtension = pathObj.ext; // '.hbs'

const info = this.getPatternInfo(
pathObj,
Expand Down

0 comments on commit 452ad5e

Please sign in to comment.