Skip to content

Commit 82d79c2

Browse files
committed
refactor: changed mustache to handlebars extensions
1 parent 9732350 commit 82d79c2

36 files changed

+169
-171
lines changed

packages/core/src/lib/buildPatterns.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module.exports = async (deletePatternDir, patternlab, additionalData) => {
9191
//take the user defined head and foot and process any data and patterns that apply
9292

9393
//todo this need to be made aware of multiple ui kits
94-
//perhaps we can check for a convention like [uikitname]_00-head.mustache, and if found, add them to patternlab.uikits[uikitname].userFoot
94+
//perhaps we can check for a convention like [uikitname]_head.hbs, and if found, add them to patternlab.uikits[uikitname].userFoot
9595
//then, if present, use those during compose()
9696
const headPatternPromise = processMetaPattern(
9797
`_head.${patternlab.config.patternExtension}`,

packages/core/src/lib/object_factory.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const Pattern = function (
3333
patternlab,
3434
isPromoteToFlatPatternRun
3535
) {
36-
this.relPath = path.normalize(relPath); // 'atoms/global/colors.mustache'
36+
this.relPath = path.normalize(relPath); // 'atoms/global/colors.hbs'
3737

3838
/**
3939
* We expect relPath to be the path of the pattern template, relative to the
@@ -52,7 +52,7 @@ const Pattern = function (
5252

5353
this.fileName = pathObj.name; // 'colors'
5454
this.subdir = pathObj.dir; // 'atoms/global'
55-
this.fileExtension = pathObj.ext; // '.mustache'
55+
this.fileExtension = pathObj.ext; // '.hbs'
5656

5757
// TODO: Remove if block when dropping ordering by prefix and keep else code
5858
// (When we drop the info about the old ordering is deprecated)
@@ -347,7 +347,7 @@ Pattern.prototype = {
347347
*/
348348
getPatternInfo: (pathObj, patternlab, isPromoteToFlatPatternRun) => {
349349
const info = {
350-
// colors(.mustache) is deeply nested in atoms-/global/colors
350+
// colors(.hbs) is deeply nested in atoms-/global/colors
351351
patternlab: patternlab,
352352
patternHasOwnDir: isPromoteToFlatPatternRun
353353
? path.basename(pathObj.dir).replace(prefixMatcher, '') ===
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blue

packages/core/test/files/_patterns/patternType1/patternSubType1/blue.mustache

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
red

packages/core/test/files/_patterns/patternType1/patternSubType1/red.mustache

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yellow

packages/core/test/files/_patterns/patternType1/patternSubType1/yellow.mustache

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
black

packages/core/test/files/_patterns/patternType1/patternSubType2/black.mustache

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)