diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 648d89c97..e67af19f9 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,7 +17,6 @@ jobs: - name: Setup the project run: | yarn run setup - npx lerna add @pattern-lab/engine-mustache --scope=@pattern-lab/core npx lerna add @pattern-lab/engine-handlebars --scope=@pattern-lab/core npx lerna add @pattern-lab/engine-underscore --scope=@pattern-lab/core npx lerna add @pattern-lab/engine-liquid --scope=@pattern-lab/core diff --git a/.prettierignore b/.prettierignore index bdfdbff8b..fba55a43b 100644 --- a/.prettierignore +++ b/.prettierignore @@ -15,3 +15,5 @@ packages/**/annotations.js **/_meta/_head.* **/_meta/_foot.* **/development-edition*/source/_patterns/** +# Ignoring handlebars template files that contain partials because of https://github.com/prettier/prettier/issues/11834 +packages/core/test/**/*.hbs \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 3fb4c3593..d44c3ae26 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,6 @@ before_install: before_script: - yarn run setup - - npx lerna add @pattern-lab/engine-mustache --scope=@pattern-lab/core - npx lerna add @pattern-lab/engine-handlebars --scope=@pattern-lab/core - npx lerna add @pattern-lab/engine-underscore --scope=@pattern-lab/core - npx lerna add @pattern-lab/engine-liquid --scope=@pattern-lab/core diff --git a/packages/cli/test/fixtures/patternlab-config.json b/packages/cli/test/fixtures/patternlab-config.json index 615be9273..1c4531e93 100644 --- a/packages/cli/test/fixtures/patternlab-config.json +++ b/packages/cli/test/fixtures/patternlab-config.json @@ -41,15 +41,15 @@ "styleguide": "node_modules/@pattern-lab/uikit-workshop/dist/", "patternlabFiles": { "general-header": - "node_modules/@pattern-lab/uikit-workshop/views/partials/general-header.mustache", + "node_modules/@pattern-lab/uikit-workshop/views/partials/general-header.hbs", "general-footer": - "node_modules/@pattern-lab/uikit-workshop/views/partials/general-footer.mustache", + "node_modules/@pattern-lab/uikit-workshop/views/partials/general-footer.hbs", "patternSection": - "node_modules/@pattern-lab/uikit-workshop/views/partials/patternSection.mustache", + "node_modules/@pattern-lab/uikit-workshop/views/partials/patternSection.hbs", "patternSectionSubgroup": - "node_modules/@pattern-lab/uikit-workshop/views/partials/patternSectionSubgroup.mustache", + "node_modules/@pattern-lab/uikit-workshop/views/partials/patternSectionSubgroup.hbs", "viewall": - "node_modules/@pattern-lab/uikit-workshop/views/viewall.mustache" + "node_modules/@pattern-lab/uikit-workshop/views/viewall.hbs" }, "js": "./test/fixtures/source/js", "images": "./test/fixtures/source/images", diff --git a/packages/core/package.json b/packages/core/package.json index 5e82b674c..03bdb0e7b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -5,7 +5,6 @@ "main": "./src/index.js", "dependencies": { "@pattern-lab/engine-handlebars": "^6.0.0", - "@pattern-lab/engine-mustache": "^6.0.0", "@pattern-lab/live-server": "^6.0.0", "chalk": "4.1.0", "chokidar": "3.5.1", diff --git a/packages/core/patternlab-config.json b/packages/core/patternlab-config.json index d3022f24b..3904633ec 100644 --- a/packages/core/patternlab-config.json +++ b/packages/core/patternlab-config.json @@ -41,15 +41,15 @@ "styleguide": "dist/", "patternlabFiles": { "general-header": - "views/partials/general-header.mustache", + "views/partials/general-header.hbs", "general-footer": - "views/partials/general-footer.mustache", + "views/partials/general-footer.hbs", "patternSection": - "views/partials/patternSection.mustache", + "views/partials/patternSection.hbs", "patternSectionSubgroup": - "views/partials/patternSectionSubgroup.mustache", + "views/partials/patternSectionSubgroup.hbs", "viewall": - "views/viewall.mustache" + "views/viewall.hbs" }, "js": "./source/js", "images": "./source/images", @@ -68,7 +68,7 @@ "css": "public/css" } }, - "patternExtension": "mustache", + "patternExtension": "hbs", "patternStateCascade": ["inprogress", "inreview", "complete"], "patternExportAll": false, "patternExportDirectory": "pattern_exports", diff --git a/packages/core/src/lib/buildPatterns.js b/packages/core/src/lib/buildPatterns.js index 476a373c6..cd0187b4c 100644 --- a/packages/core/src/lib/buildPatterns.js +++ b/packages/core/src/lib/buildPatterns.js @@ -91,7 +91,7 @@ module.exports = async (deletePatternDir, patternlab, additionalData) => { //take the user defined head and foot and process any data and patterns that apply //todo this need to be made aware of multiple ui kits - //perhaps we can check for a convention like [uikitname]_00-head.mustache, and if found, add them to patternlab.uikits[uikitname].userFoot + //perhaps we can check for a convention like [uikitname]_head.hbs, and if found, add them to patternlab.uikits[uikitname].userFoot //then, if present, use those during compose() const headPatternPromise = processMetaPattern( `_head.${patternlab.config.patternExtension}`, diff --git a/packages/core/src/lib/decompose.js b/packages/core/src/lib/decompose.js index 4c35cd694..7622eb3c7 100644 --- a/packages/core/src/lib/decompose.js +++ b/packages/core/src/lib/decompose.js @@ -4,7 +4,6 @@ const logger = require('./log'); const lh = require('./lineage_hunter'); const lih = require('./list_item_hunter'); const addPattern = require('./addPattern'); -const expandPartials = require('./expandPartials'); const lineage_hunter = new lh(); const list_item_hunter = new lih(); @@ -28,8 +27,6 @@ module.exports = function (pattern, patternlab, ignoreLineage) { patternlab ); - const expandPartialPromise = expandPartials(pattern, patternlab); - let lineagePromise; //find pattern lineage @@ -46,12 +43,9 @@ module.exports = function (pattern, patternlab, ignoreLineage) { addPattern(pattern, patternlab); }); - return Promise.all([ - listItemPromise, - expandPartialPromise, - lineagePromise, - addPromise, - ]).catch((reason) => { - logger.error(reason); - }); + return Promise.all([listItemPromise, lineagePromise, addPromise]).catch( + (reason) => { + logger.error(reason); + } + ); }; diff --git a/packages/core/src/lib/expandPartials.js b/packages/core/src/lib/expandPartials.js deleted file mode 100644 index d9f7fad8e..000000000 --- a/packages/core/src/lib/expandPartials.js +++ /dev/null @@ -1,78 +0,0 @@ -'use strict'; - -const logger = require('./log'); -const ph = require('./parameter_hunter'); -const jsonCopy = require('./json_copy'); -const getPartial = require('./get'); - -const parameter_hunter = new ph(); - -module.exports = function (currentPattern, patternlab) { - const processRecursive = require('./processRecursive'); - - //find how many partials there may be for the given pattern - const foundPatternPartials = currentPattern.findPartials(); - - // expand any partials present in this pattern; that is, drill down into - // the template and replace their calls in this template with rendered - // results - if ( - currentPattern.engine.expandPartials && - foundPatternPartials !== null && - foundPatternPartials.length > 0 - ) { - logger.debug(`found partials for ${currentPattern.patternPartial}`); - - // determine if the template contains any pattern parameters. if so they - // must be immediately consumed - return parameter_hunter - .find_parameters(currentPattern, patternlab) - .then(() => { - //do something with the regular old partials - foundPatternPartials.forEach((foundPartial) => { - const partial = currentPattern.findPartial(foundPartial); - const partialPattern = getPartial(partial, patternlab); - - //recurse through nested partials to fill out this extended template. - return processRecursive(partialPattern.relPath, patternlab) - .then(() => { - //eslint-disable-line no-loop-func - - //complete assembly of extended template - //create a copy of the partial so as to not pollute it after the getPartial call. - const cleanPartialPattern = jsonCopy( - partialPattern, - `partial pattern ${partial}` - ); - - //this is what we came here for - logger.debug( - `within ${currentPattern.patternPartial}, replacing extendedTemplate partial ${foundPartial} with ${cleanPartialPattern.patternPartial}'s extendedTemplate` - ); - - currentPattern.extendedTemplate = - currentPattern.extendedTemplate.replace( - foundPartial, - cleanPartialPattern.extendedTemplate - ); - - // update the extendedTemplate in the partials object in case this - // pattern is consumed later - patternlab.partials[currentPattern.patternPartial] = - currentPattern.extendedTemplate; - - return Promise.resolve(); - }) - .catch((reason) => { - console.log(reason); - logger.error(reason); - }); - }); - }) - .catch((reason) => { - console.log(reason); - logger.error(reason); - }); - } - return Promise.resolve(); -}; diff --git a/packages/core/src/lib/object_factory.js b/packages/core/src/lib/object_factory.js index 318b4cd25..476aa5fcf 100644 --- a/packages/core/src/lib/object_factory.js +++ b/packages/core/src/lib/object_factory.js @@ -33,7 +33,7 @@ const Pattern = function ( patternlab, isPromoteToFlatPatternRun ) { - this.relPath = path.normalize(relPath); // 'atoms/global/colors.mustache' + this.relPath = path.normalize(relPath); // 'atoms/global/colors.hbs' /** * We expect relPath to be the path of the pattern template, relative to the @@ -52,7 +52,7 @@ const Pattern = function ( this.fileName = pathObj.name; // 'colors' this.subdir = pathObj.dir; // 'atoms/global' - this.fileExtension = pathObj.ext; // '.mustache' + this.fileExtension = pathObj.ext; // '.hbs' // TODO: Remove if block when dropping ordering by prefix and keep else code // (When we drop the info about the old ordering is deprecated) @@ -343,7 +343,7 @@ Pattern.prototype = { */ getPatternInfo: (pathObj, patternlab, isPromoteToFlatPatternRun) => { const info = { - // colors(.mustache) is deeply nested in atoms-/global/colors + // colors(.hbs) is deeply nested in atoms-/global/colors patternlab: patternlab, patternHasOwnDir: isPromoteToFlatPatternRun ? path.basename(pathObj.dir).replace(prefixMatcher, '') === diff --git a/packages/core/src/lib/pattern_engines.js b/packages/core/src/lib/pattern_engines.js index 71d4da883..3e7c31d2a 100644 --- a/packages/core/src/lib/pattern_engines.js +++ b/packages/core/src/lib/pattern_engines.js @@ -83,7 +83,7 @@ function findEnginesInConfig(config) { // any loaded PatternEngine by addressing them like this: // // var PatternEngines = require('./pattern_engines/pattern_engines'); -// var Mustache = PatternEngines['mustache']; +// var Handlebars = PatternEngines['handlebars']; // // Object.create lets us create an object with a specified prototype. We want // this here because we would like the object's "own properties" to include @@ -103,14 +103,6 @@ const PatternEngines = Object.create({ const enginesInConfig = findEnginesInConfig(patternLabConfig); if (enginesInConfig) { - // Quick fix until we've removed @pattern-lab/engine-mustache, starting with https://github.com/pattern-lab/patternlab-node/issues/1239 & https://github.com/pattern-lab/patternlab-node/pull/1455 - // @TODO: Remove after removing @pattern-lab/engine-mustache dependency - enginesInConfig.mustache = enginesInConfig.mustache || {}; - enginesInConfig.mustache.package = - enginesInConfig.mustache.package || '@pattern-lab/engine-mustache'; - enginesInConfig.mustache.extensions = - enginesInConfig.mustache.extensions || 'mustache'; - // Try loading each of the configured pattern engines // eslint-disable-next-line guard-for-in for (const name in enginesInConfig) { @@ -239,9 +231,9 @@ const PatternEngines = Object.create({ } } - // otherwise, assume it's a plain mustache template string and act + // otherwise, assume it's a plain handlebars template string and act // accordingly - return 'mustache'; + return 'handlebars'; }, /** diff --git a/packages/core/test/addPattern_tests.js b/packages/core/test/addPattern_tests.js index cf495cccb..90f5aa6f6 100644 --- a/packages/core/test/addPattern_tests.js +++ b/packages/core/test/addPattern_tests.js @@ -14,7 +14,7 @@ tap.test( //arrange const patternlab = util.fakePatternLab(patterns_dir); - var pattern = new Pattern('test/bar.mustache'); + var pattern = new Pattern('test/bar.hbs'); pattern.extendedTemplate = 'barExtended'; pattern.template = 'bar'; @@ -35,7 +35,7 @@ tap.test( //arrange const patternlab = util.fakePatternLab(patterns_dir); - var pattern = new Pattern('test/bar.mustache'); + var pattern = new Pattern('test/bar.hbs'); pattern.extendedTemplate = undefined; pattern.template = 'bar'; diff --git a/packages/core/test/files/_meta/_head.mustache b/packages/core/test/files/_meta/_head.mustache deleted file mode 100644 index 14a98f369..000000000 --- a/packages/core/test/files/_meta/_head.mustache +++ /dev/null @@ -1,17 +0,0 @@ - - - - {{ title }} - - - - - - - - {{{ patternLabHead }}} - - - - - diff --git a/packages/core/test/files/_patterns/orderTest/a/a-test.mustache b/packages/core/test/files/_patterns/orderTest/a/a-test.hbs similarity index 100% rename from packages/core/test/files/_patterns/orderTest/a/a-test.mustache rename to packages/core/test/files/_patterns/orderTest/a/a-test.hbs diff --git a/packages/core/test/files/_patterns/orderTest/b/b-test.mustache b/packages/core/test/files/_patterns/orderTest/b/b-test.hbs similarity index 100% rename from packages/core/test/files/_patterns/orderTest/b/b-test.mustache rename to packages/core/test/files/_patterns/orderTest/b/b-test.hbs diff --git a/packages/core/test/files/_patterns/orderTest/c/c-test.mustache b/packages/core/test/files/_patterns/orderTest/c/c-test.hbs similarity index 100% rename from packages/core/test/files/_patterns/orderTest/c/c-test.mustache rename to packages/core/test/files/_patterns/orderTest/c/c-test.hbs diff --git a/packages/core/test/files/_patterns/orderTest/c/subfolder/subfolder.mustache b/packages/core/test/files/_patterns/orderTest/c/subfolder/subfolder.hbs similarity index 100% rename from packages/core/test/files/_patterns/orderTest/c/subfolder/subfolder.mustache rename to packages/core/test/files/_patterns/orderTest/c/subfolder/subfolder.hbs diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType1/blue.hbs b/packages/core/test/files/_patterns/patternType1/patternSubType1/blue.hbs new file mode 100644 index 000000000..f5ac3db8c --- /dev/null +++ b/packages/core/test/files/_patterns/patternType1/patternSubType1/blue.hbs @@ -0,0 +1 @@ +blue \ No newline at end of file diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType1/blue.mustache b/packages/core/test/files/_patterns/patternType1/patternSubType1/blue.mustache deleted file mode 100644 index 24560d9b8..000000000 --- a/packages/core/test/files/_patterns/patternType1/patternSubType1/blue.mustache +++ /dev/null @@ -1 +0,0 @@ -blue diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType1/red.hbs b/packages/core/test/files/_patterns/patternType1/patternSubType1/red.hbs new file mode 100644 index 000000000..46f29e8eb --- /dev/null +++ b/packages/core/test/files/_patterns/patternType1/patternSubType1/red.hbs @@ -0,0 +1 @@ +red \ No newline at end of file diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType1/red.mustache b/packages/core/test/files/_patterns/patternType1/patternSubType1/red.mustache deleted file mode 100644 index a9d1386a1..000000000 --- a/packages/core/test/files/_patterns/patternType1/patternSubType1/red.mustache +++ /dev/null @@ -1 +0,0 @@ -red diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType1/yellow.hbs b/packages/core/test/files/_patterns/patternType1/patternSubType1/yellow.hbs new file mode 100644 index 000000000..2ae696955 --- /dev/null +++ b/packages/core/test/files/_patterns/patternType1/patternSubType1/yellow.hbs @@ -0,0 +1 @@ +yellow \ No newline at end of file diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType1/yellow.mustache b/packages/core/test/files/_patterns/patternType1/patternSubType1/yellow.mustache deleted file mode 100644 index d1ed081df..000000000 --- a/packages/core/test/files/_patterns/patternType1/patternSubType1/yellow.mustache +++ /dev/null @@ -1 +0,0 @@ -yellow diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType2/black.hbs b/packages/core/test/files/_patterns/patternType1/patternSubType2/black.hbs new file mode 100644 index 000000000..b3ca90996 --- /dev/null +++ b/packages/core/test/files/_patterns/patternType1/patternSubType2/black.hbs @@ -0,0 +1 @@ +black \ No newline at end of file diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType2/black.mustache b/packages/core/test/files/_patterns/patternType1/patternSubType2/black.mustache deleted file mode 100644 index 7e66a17d4..000000000 --- a/packages/core/test/files/_patterns/patternType1/patternSubType2/black.mustache +++ /dev/null @@ -1 +0,0 @@ -black diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType2/grey.hbs b/packages/core/test/files/_patterns/patternType1/patternSubType2/grey.hbs new file mode 100644 index 000000000..d47f15103 --- /dev/null +++ b/packages/core/test/files/_patterns/patternType1/patternSubType2/grey.hbs @@ -0,0 +1 @@ +grey \ No newline at end of file diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType2/grey.mustache b/packages/core/test/files/_patterns/patternType1/patternSubType2/grey.mustache deleted file mode 100644 index 546ef5d97..000000000 --- a/packages/core/test/files/_patterns/patternType1/patternSubType2/grey.mustache +++ /dev/null @@ -1 +0,0 @@ -grey diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType2/white.hbs b/packages/core/test/files/_patterns/patternType1/patternSubType2/white.hbs new file mode 100644 index 000000000..65c27486f --- /dev/null +++ b/packages/core/test/files/_patterns/patternType1/patternSubType2/white.hbs @@ -0,0 +1 @@ +white \ No newline at end of file diff --git a/packages/core/test/files/_patterns/patternType1/patternSubType2/white.mustache b/packages/core/test/files/_patterns/patternType1/patternSubType2/white.mustache deleted file mode 100644 index 57d4625e3..000000000 --- a/packages/core/test/files/_patterns/patternType1/patternSubType2/white.mustache +++ /dev/null @@ -1 +0,0 @@ -white diff --git a/packages/core/test/files/_patterns/test/_hidden-pattern.mustache b/packages/core/test/files/_patterns/test/_hidden-pattern.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/_hidden-pattern.mustache rename to packages/core/test/files/_patterns/test/_hidden-pattern.hbs diff --git a/packages/core/test/files/_patterns/test/_ignored-pattern.hbs b/packages/core/test/files/_patterns/test/_ignored-pattern.hbs new file mode 100644 index 000000000..c2b833a59 --- /dev/null +++ b/packages/core/test/files/_patterns/test/_ignored-pattern.hbs @@ -0,0 +1 @@ +
These aren't the patterns you are looking for.
\ No newline at end of file diff --git a/packages/core/test/files/_patterns/test/_ignored-pattern.mustache b/packages/core/test/files/_patterns/test/_ignored-pattern.mustache deleted file mode 100644 index ae9ed0946..000000000 --- a/packages/core/test/files/_patterns/test/_ignored-pattern.mustache +++ /dev/null @@ -1 +0,0 @@ -
These aren't the patterns you are looking for.
diff --git a/packages/core/test/files/_patterns/test/a.hbs b/packages/core/test/files/_patterns/test/a.hbs new file mode 100644 index 000000000..9dd03c16f --- /dev/null +++ b/packages/core/test/files/_patterns/test/a.hbs @@ -0,0 +1,4 @@ +a +{{#if a}} + a! +{{/if}} \ No newline at end of file diff --git a/packages/core/test/files/_patterns/test/a.mustache b/packages/core/test/files/_patterns/test/a.mustache deleted file mode 100644 index ba154f442..000000000 --- a/packages/core/test/files/_patterns/test/a.mustache +++ /dev/null @@ -1,4 +0,0 @@ -a -{{ #a }} -a! -{{ /a }} diff --git a/packages/core/test/files/_patterns/test/another-styled-atom.hbs b/packages/core/test/files/_patterns/test/another-styled-atom.hbs new file mode 100644 index 000000000..55598c8ec --- /dev/null +++ b/packages/core/test/files/_patterns/test/another-styled-atom.hbs @@ -0,0 +1 @@ +{{> test-styled-atom additionalClasses="test_1" }} diff --git a/packages/core/test/files/_patterns/test/another-styled-atom.mustache b/packages/core/test/files/_patterns/test/another-styled-atom.mustache deleted file mode 100644 index 2f03b4974..000000000 --- a/packages/core/test/files/_patterns/test/another-styled-atom.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> test-styled-atom:test_1 }} diff --git a/packages/core/test/files/_patterns/test/b.hbs b/packages/core/test/files/_patterns/test/b.hbs new file mode 100644 index 000000000..0dccb606d --- /dev/null +++ b/packages/core/test/files/_patterns/test/b.hbs @@ -0,0 +1,5 @@ +b +{{#if b }} +b! +{{/if }} +{{> test-a a=true }} diff --git a/packages/core/test/files/_patterns/test/b.mustache b/packages/core/test/files/_patterns/test/b.mustache deleted file mode 100644 index 70997abb3..000000000 --- a/packages/core/test/files/_patterns/test/b.mustache +++ /dev/null @@ -1,5 +0,0 @@ -b -{{ #b }} -b! -{{ /b }} -{{> test-a(a: true) }} diff --git a/packages/core/test/files/_patterns/test/bar.mustache b/packages/core/test/files/_patterns/test/bar.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/bar.mustache rename to packages/core/test/files/_patterns/test/bar.hbs diff --git a/packages/core/test/files/_patterns/test/baz.mustache b/packages/core/test/files/_patterns/test/baz.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/baz.mustache rename to packages/core/test/files/_patterns/test/baz.hbs diff --git a/packages/core/test/files/_patterns/test/bookend-listitem.mustache b/packages/core/test/files/_patterns/test/bookend-listitem.hbs similarity index 70% rename from packages/core/test/files/_patterns/test/bookend-listitem.mustache rename to packages/core/test/files/_patterns/test/bookend-listitem.hbs index 816c37c92..1ef36b08d 100644 --- a/packages/core/test/files/_patterns/test/bookend-listitem.mustache +++ b/packages/core/test/files/_patterns/test/bookend-listitem.hbs @@ -1,7 +1,7 @@
{{#listItems.two}} {{> test-styled-atom }} - {{> test-styled-atom:test_1 }} + {{> test-styled-atom additionalClasses="test_1" }} {{> test-styled-atom}} {{/listItems.two}}
diff --git a/packages/core/test/files/_patterns/test/bookend-params.hbs b/packages/core/test/files/_patterns/test/bookend-params.hbs new file mode 100644 index 000000000..b3c1a704a --- /dev/null +++ b/packages/core/test/files/_patterns/test/bookend-params.hbs @@ -0,0 +1,6 @@ +
+ {{> test-styled-atom }} + {{> test-styled-atom additionalClasses="test_2" message="2" }} + {{> test-styled-atom additionalClasses="test_3" message="3" }} + {{> test-styled-atom }} +
diff --git a/packages/core/test/files/_patterns/test/bookend-params.mustache b/packages/core/test/files/_patterns/test/bookend-params.mustache deleted file mode 100644 index d2d0b4081..000000000 --- a/packages/core/test/files/_patterns/test/bookend-params.mustache +++ /dev/null @@ -1,6 +0,0 @@ -
- {{> test-styled-atom }} - {{> test-styled-atom:test_2(message: '2') }} - {{> test-styled-atom:test_3(message: '3') }} - {{> test-styled-atom }} -
diff --git a/packages/core/test/files/_patterns/test/bookend.hbs b/packages/core/test/files/_patterns/test/bookend.hbs new file mode 100644 index 000000000..1589820c2 --- /dev/null +++ b/packages/core/test/files/_patterns/test/bookend.hbs @@ -0,0 +1,6 @@ +
+ {{> test-styled-atom }} + {{> test-styled-atom additionalClasses="test_2" }} + {{> test-styled-atom additionalClasses="test_3" }} + {{> test-styled-atom}} +
diff --git a/packages/core/test/files/_patterns/test/bookend.mustache b/packages/core/test/files/_patterns/test/bookend.mustache deleted file mode 100644 index 74fc3451b..000000000 --- a/packages/core/test/files/_patterns/test/bookend.mustache +++ /dev/null @@ -1,6 +0,0 @@ -
- {{> test-styled-atom }} - {{> test-styled-atom:test_2 }} - {{> test-styled-atom:test_3 }} - {{> test-styled-atom}} -
diff --git a/packages/core/test/files/_patterns/test/c.hbs b/packages/core/test/files/_patterns/test/c.hbs new file mode 100644 index 000000000..5c462b9d2 --- /dev/null +++ b/packages/core/test/files/_patterns/test/c.hbs @@ -0,0 +1,2 @@ +c +{{> test-b b=true }} diff --git a/packages/core/test/files/_patterns/test/c.mustache b/packages/core/test/files/_patterns/test/c.mustache deleted file mode 100644 index 6098102c8..000000000 --- a/packages/core/test/files/_patterns/test/c.mustache +++ /dev/null @@ -1,2 +0,0 @@ -c -{{> test-b(b: true) }} diff --git a/packages/core/test/files/_patterns/test/comment-tag.mustache b/packages/core/test/files/_patterns/test/comment-tag.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/comment-tag.mustache rename to packages/core/test/files/_patterns/test/comment-tag.hbs diff --git a/packages/core/test/files/_patterns/test/comment.mustache b/packages/core/test/files/_patterns/test/comment.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/comment.mustache rename to packages/core/test/files/_patterns/test/comment.hbs diff --git a/packages/core/test/files/_patterns/test/foo.mustache b/packages/core/test/files/_patterns/test/foo.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/foo.mustache rename to packages/core/test/files/_patterns/test/foo.hbs diff --git a/packages/core/test/files/_patterns/test/group.hbs b/packages/core/test/files/_patterns/test/group.hbs new file mode 100644 index 000000000..a11a2dd1e --- /dev/null +++ b/packages/core/test/files/_patterns/test/group.hbs @@ -0,0 +1,6 @@ +
+ {{> test-styled-atom additionalClasses="test_1" }} + {{> test-styled-atom additionalClasses="test_2" }} + {{> test-styled-atom additionalClasses="test_3" }} + {{> test-styled-atom additionalClasses="test_4" }} +
diff --git a/packages/core/test/files/_patterns/test/group.mustache b/packages/core/test/files/_patterns/test/group.mustache deleted file mode 100644 index 24ee58979..000000000 --- a/packages/core/test/files/_patterns/test/group.mustache +++ /dev/null @@ -1,6 +0,0 @@ -
- {{> test-styled-atom:test_1 }} - {{> test-styled-atom:test_2 }} - {{> test-styled-atom:test_3 }} - {{> test-styled-atom:test_4 }} -
diff --git a/packages/core/test/files/_patterns/test/group2.hbs b/packages/core/test/files/_patterns/test/group2.hbs new file mode 100644 index 000000000..e2c4a2330 --- /dev/null +++ b/packages/core/test/files/_patterns/test/group2.hbs @@ -0,0 +1,6 @@ +
+ {{> test-styled-atom additionalClasses="test_1" message="1" }} + {{> test-styled-atom additionalClasses="test_2" message="2" }} + {{> test-styled-atom additionalClasses="test_3" message="3" }} + {{> test-styled-atom additionalClasses="test_4" message="4" }} +
diff --git a/packages/core/test/files/_patterns/test/group2.mustache b/packages/core/test/files/_patterns/test/group2.mustache deleted file mode 100644 index a3986a1b5..000000000 --- a/packages/core/test/files/_patterns/test/group2.mustache +++ /dev/null @@ -1,6 +0,0 @@ -
- {{> test-styled-atom:test_1(message: "1" ) }} - {{> test-styled-atom:test_2(message: "2" ) }} - {{> test-styled-atom:test_3(message: "3" ) }} - {{> test-styled-atom:test_4(message: "4" ) }} -
diff --git a/packages/core/test/files/_patterns/test/hidden-pattern-tester.mustache b/packages/core/test/files/_patterns/test/hidden-pattern-tester.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/hidden-pattern-tester.mustache rename to packages/core/test/files/_patterns/test/hidden-pattern-tester.hbs diff --git a/packages/core/test/files/_patterns/test/inception.mustache b/packages/core/test/files/_patterns/test/inception.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/inception.mustache rename to packages/core/test/files/_patterns/test/inception.hbs diff --git a/packages/core/test/files/_patterns/test/link.mustache b/packages/core/test/files/_patterns/test/link.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/link.mustache rename to packages/core/test/files/_patterns/test/link.hbs diff --git a/packages/core/test/files/_patterns/test/linkInParameter.hbs b/packages/core/test/files/_patterns/test/linkInParameter.hbs new file mode 100644 index 000000000..aa2e1cd9b --- /dev/null +++ b/packages/core/test/files/_patterns/test/linkInParameter.hbs @@ -0,0 +1 @@ +{{> test-link url='link.test-comment' }} diff --git a/packages/core/test/files/_patterns/test/linkInParameter.mustache b/packages/core/test/files/_patterns/test/linkInParameter.mustache deleted file mode 100644 index 7cba618ce..000000000 --- a/packages/core/test/files/_patterns/test/linkInParameter.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> test-link(url: 'link.test-comment') }} diff --git a/packages/core/test/files/_patterns/test/list.mustache b/packages/core/test/files/_patterns/test/list.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/list.mustache rename to packages/core/test/files/_patterns/test/list.hbs diff --git a/packages/core/test/files/_patterns/test/listWithListItems.mustache b/packages/core/test/files/_patterns/test/listWithListItems.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/listWithListItems.mustache rename to packages/core/test/files/_patterns/test/listWithListItems.hbs diff --git a/packages/core/test/files/_patterns/test/listWithPartial.mustache b/packages/core/test/files/_patterns/test/listWithPartial.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/listWithPartial.mustache rename to packages/core/test/files/_patterns/test/listWithPartial.hbs diff --git a/packages/core/test/files/_patterns/test/listitem.mustache b/packages/core/test/files/_patterns/test/listitem.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/listitem.mustache rename to packages/core/test/files/_patterns/test/listitem.hbs diff --git a/packages/core/test/files/_patterns/test/mirror.mustache b/packages/core/test/files/_patterns/test/mirror.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/mirror.mustache rename to packages/core/test/files/_patterns/test/mirror.hbs diff --git a/packages/core/test/files/_patterns/test/mixed-params.hbs b/packages/core/test/files/_patterns/test/mixed-params.hbs new file mode 100644 index 000000000..dcf8b6ebc --- /dev/null +++ b/packages/core/test/files/_patterns/test/mixed-params.hbs @@ -0,0 +1,6 @@ +
+ {{> test-styled-atom }} + {{> test-styled-atom additionalClasses="test_2" message='2' }} + {{> test-styled-atom additionalClasses="test_3" message='3' }} + {{> test-styled-atom additionalClasses="test_4" message='4' }} +
diff --git a/packages/core/test/files/_patterns/test/mixed-params.mustache b/packages/core/test/files/_patterns/test/mixed-params.mustache deleted file mode 100644 index 408b3f1e4..000000000 --- a/packages/core/test/files/_patterns/test/mixed-params.mustache +++ /dev/null @@ -1,6 +0,0 @@ -
- {{> test-styled-atom }} - {{> test-styled-atom:test_2(message: '2') }} - {{> test-styled-atom:test_3(message: '3') }} - {{> test-styled-atom:test_4(message: '4') }} -
diff --git a/packages/core/test/files/_patterns/test/mixed.hbs b/packages/core/test/files/_patterns/test/mixed.hbs new file mode 100644 index 000000000..0f432dff1 --- /dev/null +++ b/packages/core/test/files/_patterns/test/mixed.hbs @@ -0,0 +1,6 @@ +
+ {{> test-styled-atom }} + {{> test-styled-atom additionalClasses="test_2" }} + {{> test-styled-atom additionalClasses="test_3" }} + {{> test-styled-atom additionalClasses="test_4" }} +
diff --git a/packages/core/test/files/_patterns/test/mixed.mustache b/packages/core/test/files/_patterns/test/mixed.mustache deleted file mode 100644 index b0c6d610f..000000000 --- a/packages/core/test/files/_patterns/test/mixed.mustache +++ /dev/null @@ -1,6 +0,0 @@ -
- {{> test-styled-atom }} - {{> test-styled-atom:test_2 }} - {{> test-styled-atom:test_3 }} - {{> test-styled-atom:test_4 }} -
diff --git a/packages/core/test/files/_patterns/test/multiple-classes-numeric.hbs b/packages/core/test/files/_patterns/test/multiple-classes-numeric.hbs new file mode 100644 index 000000000..5e67cc16a --- /dev/null +++ b/packages/core/test/files/_patterns/test/multiple-classes-numeric.hbs @@ -0,0 +1,5 @@ +
+ {{> test-styled-atom additionalClasses="foo1" }} + {{> test-styled-atom additionalClasses="foo1 foo2" }} + {{> test-styled-atom additionalClasses="foo1 foo2" message="bar" }} +
diff --git a/packages/core/test/files/_patterns/test/multiple-classes-numeric.mustache b/packages/core/test/files/_patterns/test/multiple-classes-numeric.mustache deleted file mode 100644 index 307439ce4..000000000 --- a/packages/core/test/files/_patterns/test/multiple-classes-numeric.mustache +++ /dev/null @@ -1,5 +0,0 @@ -
- {{> test-styled-atom:foo1 }} - {{> test-styled-atom:foo1|foo2 }} - {{> test-styled-atom:foo1|foo2(message: "bar") }} -
diff --git a/packages/core/test/files/_patterns/test/nav.mustache b/packages/core/test/files/_patterns/test/nav.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/nav.mustache rename to packages/core/test/files/_patterns/test/nav.hbs diff --git a/packages/core/test/files/_patterns/test/paramMiddle.mustache b/packages/core/test/files/_patterns/test/paramMiddle.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/paramMiddle.mustache rename to packages/core/test/files/_patterns/test/paramMiddle.hbs diff --git a/packages/core/test/files/_patterns/test/paramParent.hbs b/packages/core/test/files/_patterns/test/paramParent.hbs new file mode 100644 index 000000000..ee088d5f1 --- /dev/null +++ b/packages/core/test/files/_patterns/test/paramParent.hbs @@ -0,0 +1 @@ +{{> test-paramMiddle additionalClasses="foo" }} diff --git a/packages/core/test/files/_patterns/test/paramParent.mustache b/packages/core/test/files/_patterns/test/paramParent.mustache deleted file mode 100644 index 5ae3cb466..000000000 --- a/packages/core/test/files/_patterns/test/paramParent.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> test-paramMiddle(additionalClasses: "foo") }} diff --git a/packages/core/test/files/_patterns/test/parameterTags.hbs b/packages/core/test/files/_patterns/test/parameterTags.hbs new file mode 100644 index 000000000..fb6cd4fc0 --- /dev/null +++ b/packages/core/test/files/_patterns/test/parameterTags.hbs @@ -0,0 +1 @@ +{{> test-comment-tag tag1='Single-quoted' tag2='Double-quoted' tag3='With attributes' }} diff --git a/packages/core/test/files/_patterns/test/parameterTags.mustache b/packages/core/test/files/_patterns/test/parameterTags.mustache deleted file mode 100644 index d8d3955f4..000000000 --- a/packages/core/test/files/_patterns/test/parameterTags.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> test-comment-tag(tag1: 'Single-quoted', tag2: \"Double-quoted\", tag3: 'With attributes') }} diff --git a/packages/core/test/files/_patterns/test/pattern-wrap-class-json.mustache b/packages/core/test/files/_patterns/test/pattern-wrap-class-json.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/pattern-wrap-class-json.mustache rename to packages/core/test/files/_patterns/test/pattern-wrap-class-json.hbs diff --git a/packages/core/test/files/_patterns/test/pattern-wrap-class-markdown.mustache b/packages/core/test/files/_patterns/test/pattern-wrap-class-markdown.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/pattern-wrap-class-markdown.mustache rename to packages/core/test/files/_patterns/test/pattern-wrap-class-markdown.hbs diff --git a/packages/core/test/files/_patterns/test/pseudomodifier.hbs b/packages/core/test/files/_patterns/test/pseudomodifier.hbs new file mode 100644 index 000000000..6b3691bf7 --- /dev/null +++ b/packages/core/test/files/_patterns/test/pseudomodifier.hbs @@ -0,0 +1,2 @@ +{{test}} +{{> test-styled-atom additionalClasses="modifier--foo" }} diff --git a/packages/core/test/files/_patterns/test/pseudomodifier.mustache b/packages/core/test/files/_patterns/test/pseudomodifier.mustache deleted file mode 100644 index 3ddc86ae6..000000000 --- a/packages/core/test/files/_patterns/test/pseudomodifier.mustache +++ /dev/null @@ -1,2 +0,0 @@ -{{test}} -{{> test-styled-atom:modifier--foo }} diff --git a/packages/core/test/files/_patterns/test/repeatedListItems.mustache b/packages/core/test/files/_patterns/test/repeatedListItems.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/repeatedListItems.mustache rename to packages/core/test/files/_patterns/test/repeatedListItems.hbs diff --git a/packages/core/test/files/_patterns/test/sticky-comment-verbose.hbs b/packages/core/test/files/_patterns/test/sticky-comment-verbose.hbs new file mode 100644 index 000000000..e4359ba2c --- /dev/null +++ b/packages/core/test/files/_patterns/test/sticky-comment-verbose.hbs @@ -0,0 +1 @@ +{{> test/comment description='A life is like a garden. Perfect moments can be had, but not preserved, except in memory.' }} diff --git a/packages/core/test/files/_patterns/test/sticky-comment-verbose.mustache b/packages/core/test/files/_patterns/test/sticky-comment-verbose.mustache deleted file mode 100644 index 168b757d9..000000000 --- a/packages/core/test/files/_patterns/test/sticky-comment-verbose.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> test/comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }} diff --git a/packages/core/test/files/_patterns/test/sticky-comment.hbs b/packages/core/test/files/_patterns/test/sticky-comment.hbs new file mode 100644 index 000000000..ffaeeb272 --- /dev/null +++ b/packages/core/test/files/_patterns/test/sticky-comment.hbs @@ -0,0 +1 @@ +{{> test-comment description='A life is like a garden. Perfect moments can be had, but not preserved, except in memory.' }} diff --git a/packages/core/test/files/_patterns/test/sticky-comment.mustache b/packages/core/test/files/_patterns/test/sticky-comment.mustache deleted file mode 100644 index 4bc1899e9..000000000 --- a/packages/core/test/files/_patterns/test/sticky-comment.mustache +++ /dev/null @@ -1 +0,0 @@ -{{> test-comment(description: 'A life is like a garden. Perfect moments can be had, but not preserved, except in memory.') }} diff --git a/packages/core/test/files/_patterns/test/styled-atom.mustache b/packages/core/test/files/_patterns/test/styled-atom.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/styled-atom.mustache rename to packages/core/test/files/_patterns/test/styled-atom.hbs diff --git a/packages/core/test/files/_patterns/test/variant-test.mustache b/packages/core/test/files/_patterns/test/variant-test.hbs similarity index 100% rename from packages/core/test/files/_patterns/test/variant-test.mustache rename to packages/core/test/files/_patterns/test/variant-test.hbs diff --git a/packages/core/test/files/partials/general-footer.mustache b/packages/core/test/files/partials/general-footer.hbs similarity index 100% rename from packages/core/test/files/partials/general-footer.mustache rename to packages/core/test/files/partials/general-footer.hbs diff --git a/packages/core/test/files/partials/general-header.mustache b/packages/core/test/files/partials/general-header.hbs similarity index 100% rename from packages/core/test/files/partials/general-header.mustache rename to packages/core/test/files/partials/general-header.hbs diff --git a/packages/core/test/files/partials/patternSection.mustache b/packages/core/test/files/partials/patternSection.hbs similarity index 100% rename from packages/core/test/files/partials/patternSection.mustache rename to packages/core/test/files/partials/patternSection.hbs diff --git a/packages/core/test/files/partials/patternSectionSubgroup.mustache b/packages/core/test/files/partials/patternSectionSubgroup.hbs similarity index 100% rename from packages/core/test/files/partials/patternSectionSubgroup.mustache rename to packages/core/test/files/partials/patternSectionSubgroup.hbs diff --git a/packages/core/test/files/viewall.mustache b/packages/core/test/files/viewall.hbs similarity index 100% rename from packages/core/test/files/viewall.mustache rename to packages/core/test/files/viewall.hbs diff --git a/packages/core/test/lineage_hunter_tests.js b/packages/core/test/lineage_hunter_tests.js index 31a40b764..fd6a036cc 100644 --- a/packages/core/test/lineage_hunter_tests.js +++ b/packages/core/test/lineage_hunter_tests.js @@ -22,7 +22,7 @@ const lineage_hunter = new lh(); // fake pattern creators function createFakeEmptyErrorPattern() { return new Pattern( - 'molecules/toast/error.mustache', // relative path now + 'molecules/toast/error.hbs', // relative path now null // data ); } @@ -61,7 +61,7 @@ function createBasePatternLabObject() { tap.test('find_lineage - finds lineage', function (test) { //setup current pattern from what we would have during execution var currentPattern = new Pattern( - 'organisms/global/header.mustache', // relative path now + 'organisms/global/header.hbs', // relative path now null // data ); extend(currentPattern, { @@ -77,7 +77,7 @@ tap.test('find_lineage - finds lineage', function (test) { Pattern.createEmpty({ name: 'atoms-images-logo', subdir: 'atoms\\images', - filename: 'logo.mustache', + filename: 'logo.hbs', data: null, template: '', @@ -98,7 +98,7 @@ tap.test('find_lineage - finds lineage', function (test) { Pattern.createEmpty({ name: 'molecules-navigation-primary-nav', subdir: 'molecules\\navigation', - filename: 'primary-nav.mustache', + filename: 'primary-nav.hbs', data: null, template: '\r\n', @@ -120,7 +120,7 @@ tap.test('find_lineage - finds lineage', function (test) { Pattern.createEmpty({ name: 'molecules-forms-search', subdir: 'molecules\\forms', - filename: 'search.mustache', + filename: 'search.hbs', data: null, template: '
\r\n
\r\n\t Search\r\n\t \r\n\t \r\n\t \r\n
\r\n
', @@ -178,7 +178,7 @@ tap.test( var patternlab = { graph: new PatternGraph(null, 0), patterns: [ - Pattern.create('atoms/alerts/error.mustache', null, { + Pattern.create('atoms/alerts/error.hbs', null, { template: '

{{message}}

', extendedTemplate: '

{{message}}

', }), @@ -231,9 +231,9 @@ tap.test( //arrange var pl = createBasePatternLabObject(); - var atomPattern = new of.Pattern('test/bar.mustache'); + var atomPattern = new of.Pattern('test/bar.hbs'); atomPattern.template = fs.readFileSync( - pl.config.paths.source.patterns + 'test/bar.mustache', + pl.config.paths.source.patterns + 'test/bar.hbs', 'utf8' ); atomPattern.extendedTemplate = atomPattern.template; @@ -241,9 +241,9 @@ tap.test( addPattern(atomPattern, pl); - var consumerPattern = new of.Pattern('test/foo.mustache'); + var consumerPattern = new of.Pattern('test/foo.hbs'); consumerPattern.template = fs.readFileSync( - pl.config.paths.source.patterns + 'test/foo.mustache', + pl.config.paths.source.patterns + 'test/foo.hbs', 'utf8' ); consumerPattern.extendedTemplate = consumerPattern.template; @@ -268,9 +268,9 @@ tap.test( //arrange var pl = createBasePatternLabObject(); - var atomPattern = new of.Pattern('test/bar.mustache'); + var atomPattern = new of.Pattern('test/bar.hbs'); atomPattern.template = fs.readFileSync( - pl.config.paths.source.patterns + 'test/bar.mustache', + pl.config.paths.source.patterns + 'test/bar.hbs', 'utf8' ); atomPattern.extendedTemplate = atomPattern.template; @@ -278,9 +278,9 @@ tap.test( addPattern(atomPattern, pl); - var consumerPattern = new of.Pattern('test/foo.mustache'); + var consumerPattern = new of.Pattern('test/foo.hbs'); consumerPattern.template = fs.readFileSync( - pl.config.paths.source.patterns + 'test/foo.mustache', + pl.config.paths.source.patterns + 'test/foo.hbs', 'utf8' ); consumerPattern.extendedTemplate = consumerPattern.template; @@ -306,8 +306,8 @@ tap.test( //arrange var pl = createBasePatternLabObject(); - var atomPattern = loadPattern('test/bar.mustache', pl); - var consumerPattern = loadPattern('test/foo.mustache', pl); + var atomPattern = loadPattern('test/bar.hbs', pl); + var consumerPattern = loadPattern('test/foo.hbs', pl); lineage_hunter.find_lineage(consumerPattern, pl); @@ -329,9 +329,9 @@ tap.test( //arrange var pl = createBasePatternLabObject(); - var atomPattern = new of.Pattern('test/bar.mustache'); + var atomPattern = new of.Pattern('test/bar.hbs'); atomPattern.template = fs.readFileSync( - path.resolve(pl.config.paths.source.patterns, 'test/bar.mustache'), + path.resolve(pl.config.paths.source.patterns, 'test/bar.hbs'), 'utf8' ); atomPattern.extendedTemplate = atomPattern.template; @@ -339,9 +339,9 @@ tap.test( addPattern(atomPattern, pl); - var consumerPattern = new of.Pattern('test/foo.mustache'); + var consumerPattern = new of.Pattern('test/foo.hbs'); consumerPattern.template = fs.readFileSync( - path.resolve(pl.config.paths.source.patterns, 'test/foo.mustache'), + path.resolve(pl.config.paths.source.patterns, 'test/foo.hbs'), 'utf8' ); consumerPattern.extendedTemplate = consumerPattern.template; @@ -377,7 +377,7 @@ tap.test( Pattern.createEmpty({ name: 'atoms-alerts-error', subdir: 'atoms\\alerts', - filename: 'error.mustache', + filename: 'error.hbs', data: null, template: '

{{message}}

', extendedTemplate: '

{{message}}

', @@ -441,7 +441,7 @@ tap.test('find_lineage - does not apply lineage twice', function (test) { Pattern.createEmpty({ name: 'atoms-alerts-error', subdir: 'atoms\\alerts', - filename: 'error.mustache', + filename: 'error.hbs', data: null, template: '

{{message}}

', extendedTemplate: '

{{message}}

', diff --git a/packages/core/test/list_item_hunter_tests.js b/packages/core/test/list_item_hunter_tests.js index 5447f194f..90c5944ad 100644 --- a/packages/core/test/list_item_hunter_tests.js +++ b/packages/core/test/list_item_hunter_tests.js @@ -19,7 +19,7 @@ tap.test( (test) => { //arrange const pl = util.fakePatternLab(testPatternsPath); - const listPath = path.join('test', 'list.mustache'); + const listPath = path.join('test', 'list.hbs'); const testPattern = loadPattern(listPath, pl); //usually decompose does this @@ -46,7 +46,7 @@ tap.test( (test) => { //arrange const pl = util.fakePatternLab(testPatternsPath); - const listPath = path.join('test', 'listWithPartial.mustache'); + const listPath = path.join('test', 'listWithPartial.hbs'); const testPattern = loadPattern(listPath, pl); //usually decompose does this diff --git a/packages/core/test/loadPattern_tests.js b/packages/core/test/loadPattern_tests.js index d2903a6c0..e48f9b723 100644 --- a/packages/core/test/loadPattern_tests.js +++ b/packages/core/test/loadPattern_tests.js @@ -31,7 +31,7 @@ tap.test( tap.test('loadPattern - loads pattern sibling json if found', function (test) { //arrange const patternlab = util.fakePatternLab(patterns_dir); - var patternPath = path.join('test', 'styled-atom.mustache'); + var patternPath = path.join('test', 'styled-atom.hbs'); //act var result = loadPattern(patternPath, patternlab); @@ -46,7 +46,7 @@ tap.test( function (test) { //arrange const patternlab = util.fakePatternLab(patterns_dir); - var fooPatternPath = path.join('test', 'bar.mustache'); + var fooPatternPath = path.join('test', 'bar.hbs'); //act var result = loadPattern(fooPatternPath, patternlab); @@ -62,7 +62,7 @@ tap.test( function (test) { //arrange const patternlab = util.fakePatternLab(patterns_dir); - var fooPatternPath = path.join('test', 'bar.mustache'); + var fooPatternPath = path.join('test', 'bar.hbs'); //act var result = loadPattern(fooPatternPath, patternlab); @@ -104,7 +104,7 @@ tap.test( (test) => { //arrange const patternlab = util.fakePatternLab(patterns_dir); - const basePatternPath = path.join('test', 'pseudomodifier.mustache'); + const basePatternPath = path.join('test', 'pseudomodifier.hbs'); //act const result = loadPattern(basePatternPath, patternlab); @@ -122,13 +122,13 @@ tap.test( //arrange const patternlab = util.fakePatternLab(patterns_dir); - const basePatternAPath = path.join('orderTest', 'a', 'a-test.mustache'); - const basePatternBPath = path.join('orderTest', 'b', 'b-test.mustache'); + const basePatternAPath = path.join('orderTest', 'a', 'a-test.hbs'); + const basePatternBPath = path.join('orderTest', 'b', 'b-test.hbs'); const basePatternCPath = path.join( 'orderTest', 'c', 'subfolder', - 'subfolder.mustache' + 'subfolder.hbs' ); //act diff --git a/packages/core/test/markModifiedPatterns_tests.js b/packages/core/test/markModifiedPatterns_tests.js index 18f06d646..552a2a2fc 100644 --- a/packages/core/test/markModifiedPatterns_tests.js +++ b/packages/core/test/markModifiedPatterns_tests.js @@ -40,7 +40,7 @@ tap.only( markupOnly: '.markup-only', }; - var pattern = new Pattern('test/bar.mustache'); + var pattern = new Pattern('test/bar.hbs'); pattern.extendedTemplate = undefined; pattern.template = 'bar'; @@ -83,7 +83,7 @@ tap.test( patternlab.config = { logLevel: 'quiet' }; patternlab.config.outputFileSuffixes = { rendered: '' }; - var pattern = new Pattern('test/bar.mustache'); + var pattern = new Pattern('test/bar.hbs'); pattern.extendedTemplate = undefined; pattern.template = 'bar'; pattern.lastModified = undefined; @@ -106,7 +106,7 @@ tap.test( patternlab.config = { logLevel: 'quiet' }; patternlab.config.outputFileSuffixes = { rendered: '' }; - var pattern = new Pattern('test/bar.mustache'); + var pattern = new Pattern('test/bar.hbs'); pattern.extendedTemplate = undefined; pattern.template = 'bar'; pattern.lastModified = 100000; diff --git a/packages/core/test/object_factory_tests.js b/packages/core/test/object_factory_tests.js index 6684628df..79551af7c 100644 --- a/packages/core/test/object_factory_tests.js +++ b/packages/core/test/object_factory_tests.js @@ -31,15 +31,15 @@ var engineLoader = require('../src/lib/pattern_engines'); engineLoader.loadAllEngines(config); tap.test('test Pattern initializes correctly', function (test) { - var p = new Pattern('atoms/global/colors.mustache', { d: 123 }); + var p = new Pattern('atoms/global/colors.hbs', { d: 123 }); test.equal( p.relPath, - 'atoms' + path.sep + 'global' + path.sep + 'colors.mustache' + 'atoms' + path.sep + 'global' + path.sep + 'colors.hbs' ); test.equal(p.name, 'atoms-global-colors'); test.equal(p.subdir, 'atoms' + path.sep + 'global'); test.equal(p.fileName, 'colors'); - test.equal(p.fileExtension, '.mustache'); + test.equal(p.fileExtension, '.hbs'); test.equal(p.jsonFileData.d, 123); test.equal(p.patternBaseName, 'colors'); test.equal(p.patternName, 'Colors'); @@ -64,7 +64,7 @@ tap.test('test Pattern initializes correctly', function (test) { tap.test( 'test Pattern initializes correctly with pattern in sepatated directory', function (test) { - var p = new Pattern('atoms/global/colors/colors.mustache', { + var p = new Pattern('atoms/global/colors/colors.hbs', { d: 123, }); test.equal( @@ -75,12 +75,12 @@ tap.test( path.sep + 'colors' + path.sep + - 'colors.mustache' + 'colors.hbs' ); test.equal(p.name, 'atoms-global-colors'); test.equal(p.subdir, path.join('atoms', 'global', 'colors')); test.equal(p.fileName, 'colors'); - test.equal(p.fileExtension, '.mustache'); + test.equal(p.fileExtension, '.hbs'); test.equal(p.jsonFileData.d, 123); test.equal(p.patternBaseName, 'colors'); test.equal(p.patternName, 'Colors'); @@ -106,7 +106,7 @@ tap.test( tap.test( 'test Pattern name for variants correctly initialzed', function (test) { - var p1 = new Pattern('atoms/global/colors/colors~variant.mustache', { + var p1 = new Pattern('atoms/global/colors/colors~variant.hbs', { d: 123, }); var p2 = new Pattern('atoms/global/colors/colors~variant-minus.json', { @@ -121,12 +121,12 @@ tap.test( tap.test( 'test Pattern with one-directory subdir works as expected', function (test) { - var p = new Pattern('atoms/colors.mustache', { d: 123 }); - test.equal(p.relPath, 'atoms' + path.sep + 'colors.mustache'); + var p = new Pattern('atoms/colors.hbs', { d: 123 }); + test.equal(p.relPath, 'atoms' + path.sep + 'colors.hbs'); test.equal(p.name, 'atoms-colors'); test.equal(p.subdir, 'atoms'); test.equal(p.fileName, 'colors'); - test.equal(p.fileExtension, '.mustache'); + test.equal(p.fileExtension, '.hbs'); test.equal(p.jsonFileData.d, 123); test.equal(p.patternBaseName, 'colors'); test.equal(p.patternName, 'Colors'); @@ -149,14 +149,14 @@ tap.test( tap.test( 'test Pattern with own-directory gets resetted as expected', function (test) { - var p = new Pattern('atoms/button/button.mustache', { d: 123 }, pl); + var p = new Pattern('atoms/button/button.hbs', { d: 123 }, pl); p.promoteFromDirectoryToFlatPattern(pl); - test.equal(p.relPath, path.join('atoms', 'button', 'button.mustache')); + test.equal(p.relPath, path.join('atoms', 'button', 'button.hbs')); test.equal(p.name, 'atoms-button'); test.equal(p.subdir, path.join('atoms', 'button')); test.equal(p.fileName, 'button'); - test.equal(p.fileExtension, '.mustache'); + test.equal(p.fileExtension, '.hbs'); test.equal(p.jsonFileData.d, 123); test.equal(p.patternBaseName, 'button'); test.equal(p.patternName, 'Button'); @@ -179,8 +179,8 @@ tap.test( tap.test( 'test Pattern with no numbers in pattern group works as expected', function (test) { - var p = new Pattern('atoms/colors.mustache', { d: 123 }); - test.equal(p.relPath, 'atoms' + path.sep + 'colors.mustache'); + var p = new Pattern('atoms/colors.hbs', { d: 123 }); + test.equal(p.relPath, 'atoms' + path.sep + 'colors.hbs'); test.equal(p.name, 'atoms-colors'); test.equal(p.subdir, 'atoms'); test.equal(p.fileName, 'colors'); @@ -198,7 +198,7 @@ tap.test( tap.test( 'test Pattern capitalizes patternDisplayName correctly', function (test) { - var p = new Pattern('atoms/global/colors-alt.mustache', { d: 123 }); + var p = new Pattern('atoms/global/colors-alt.hbs', { d: 123 }); test.equal(p.patternBaseName, 'colors-alt'); test.equal(p.patternName, 'Colors Alt'); test.end(); @@ -208,16 +208,16 @@ tap.test( tap.test( 'test Pattern get dir level no separated pattern directory', function (test) { - var p = new Pattern('atoms/global/colors-alt.mustache', { d: 123 }); + var p = new Pattern('atoms/global/colors-alt.hbs', { d: 123 }); console.log(p); test.equal(p.getDirLevel(0, { patternHasOwnDir: false }), 'atoms'); test.equal(p.getDirLevel(1, { patternHasOwnDir: false }), 'global'); test.equal(p.getDirLevel(2, { patternHasOwnDir: false }), ''); // There is no third level - var p = new Pattern('atoms/colors-alt.mustache', { d: 123 }); + var p = new Pattern('atoms/colors-alt.hbs', { d: 123 }); test.equal(p.getDirLevel(0, { patternHasOwnDir: false }), 'atoms'); test.equal(p.getDirLevel(1, { patternHasOwnDir: false }), ''); // There is no second level test.equal(p.getDirLevel(2, { patternHasOwnDir: false }), ''); // There is no third level - var p = new Pattern('colors-alt.mustache', { d: 123 }); + var p = new Pattern('colors-alt.hbs', { d: 123 }); test.equal(p.getDirLevel(0, { patternHasOwnDir: false }), 'root'); // No first level means root test.equal(p.getDirLevel(1, { patternHasOwnDir: false }), ''); // There is no second level test.equal(p.getDirLevel(2, { patternHasOwnDir: false }), ''); // There is no third leveL @@ -228,26 +228,26 @@ tap.test( tap.test( 'test Pattern get dir level with separated pattern directory', function (test) { - var p = new Pattern('atoms/global/colors-alt/colors-alt.mustache', { + var p = new Pattern('atoms/global/colors-alt/colors-alt.hbs', { d: 123, }); test.equal(p.getDirLevel(0, { patternHasOwnDir: true }), 'atoms'); test.equal(p.getDirLevel(1, { patternHasOwnDir: true }), 'global'); test.equal(p.getDirLevel(2, { patternHasOwnDir: true }), ''); // There is no third level - var p = new Pattern('atoms/colors-alt/colors-alt.mustache', { + var p = new Pattern('atoms/colors-alt/colors-alt.hbs', { d: 123, }); test.equal(p.getDirLevel(0, { patternHasOwnDir: true }), 'atoms'); test.equal(p.getDirLevel(1, { patternHasOwnDir: true }), ''); // There is no second level test.equal(p.getDirLevel(2, { patternHasOwnDir: true }), ''); // There is no third level - var p = new Pattern('colors-alt/colors-alt.mustache', { d: 123 }); + var p = new Pattern('colors-alt/colors-alt.hbs', { d: 123 }); test.equal(p.getDirLevel(0, { patternHasOwnDir: true }), 'root'); // No first level means root test.equal(p.getDirLevel(1, { patternHasOwnDir: true }), ''); // There is no second level test.equal(p.getDirLevel(2, { patternHasOwnDir: true }), ''); // There is no third leveL - var p = new Pattern('atoms/global/colors-alt/colors-alt~variant.mustache', { + var p = new Pattern('atoms/global/colors-alt/colors-alt~variant.hbs', { d: 123, }); test.equal(p.name, 'atoms-global-colors-alt-variant'); @@ -261,14 +261,14 @@ tap.test( tap.test( 'test Patterns that are nested deeper without own directory', function (test) { - var p = new Pattern('atoms/global/random-folder/colors-alt.mustache', { + var p = new Pattern('atoms/global/random-folder/colors-alt.hbs', { d: 123, }); test.equal(p.name, 'atoms-global-colors-alt'); test.equal(p.flatPatternPath, 'atoms-global'); var p = new Pattern( - 'atoms/global/random-folder/another-folder/colors-alt.mustache', + 'atoms/global/random-folder/another-folder/colors-alt.hbs', { d: 123, } @@ -277,21 +277,21 @@ tap.test( test.equal(p.flatPatternPath, 'atoms-global'); var p = new Pattern( - 'atoms/global/random-folder/another-folder/some-folder/colors-alt.mustache', + 'atoms/global/random-folder/another-folder/some-folder/colors-alt.hbs', { d: 123 } ); test.equal(p.name, 'atoms-global-colors-alt'); test.equal(p.flatPatternPath, 'atoms-global'); var p = new Pattern( - 'atoms/global/random-folder/another-folder/colors-alt/colors-alt.mustache', + 'atoms/global/random-folder/another-folder/colors-alt/colors-alt.hbs', { d: 123 } ); test.equal(p.name, 'atoms-global-colors-alt'); test.equal(p.flatPatternPath, 'atoms-global'); var p = new Pattern( - 'atoms/global/random-folder/another-folder/some-folder/colors-alt~variant.mustache', + 'atoms/global/random-folder/another-folder/some-folder/colors-alt~variant.hbs', { d: 123 } ); test.equal(p.name, 'atoms-global-colors-alt-variant'); diff --git a/packages/core/test/parameter_hunter_tests.js b/packages/core/test/parameter_hunter_tests.js index b19314d10..41ee754e2 100644 --- a/packages/core/test/parameter_hunter_tests.js +++ b/packages/core/test/parameter_hunter_tests.js @@ -20,10 +20,10 @@ tap.test('parameter hunter finds and extends templates', function (test) { //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); var p1 = processIterative(commentPattern, pl); @@ -55,10 +55,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment-verbose.mustache'); + var testPatternPath = path.join('test', 'sticky-comment-verbose.hbs'); var testPattern = loadPattern(testPatternPath, pl); var p1 = processIterative(commentPattern, pl); @@ -93,10 +93,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -127,10 +127,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -161,10 +161,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -195,10 +195,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -230,10 +230,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -265,10 +265,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -299,10 +299,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -334,10 +334,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -369,10 +369,10 @@ tap.test( //arrange const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file @@ -403,10 +403,10 @@ tap.test( // //arrange // const pl = util.fakePatternLab(testPatternsPath); -// var commentPath = path.join('test', 'comment.mustache'); +// var commentPath = path.join('test', 'comment.hbs'); // var commentPattern = loadPattern(commentPath, pl); -// var testPatternPath = path.join('test', 'sticky-comment.mustache'); +// var testPatternPath = path.join('test', 'sticky-comment.hbs'); // var testPattern = loadPattern(testPatternPath, pl); // //override the file @@ -430,10 +430,10 @@ tap.test( tap.test('parameter hunter skips malformed parameters', function (test) { const pl = util.fakePatternLab(testPatternsPath); - var commentPath = path.join('test', 'comment.mustache'); + var commentPath = path.join('test', 'comment.hbs'); var commentPattern = loadPattern(commentPath, pl); - var testPatternPath = path.join('test', 'sticky-comment.mustache'); + var testPatternPath = path.join('test', 'sticky-comment.hbs'); var testPattern = loadPattern(testPatternPath, pl); //override the file diff --git a/packages/core/test/parseAllLinks_tests.js b/packages/core/test/parseAllLinks_tests.js index 7077bf454..fe5d85d08 100644 --- a/packages/core/test/parseAllLinks_tests.js +++ b/packages/core/test/parseAllLinks_tests.js @@ -36,7 +36,7 @@ tap.test( ); // copies essential logic from loadPattern - const navPattern = new Pattern('test/nav.mustache', {}, patternlab); + const navPattern = new Pattern('test/nav.hbs', {}, patternlab); const patternData = dataLoader.loadDataFromFile( path.resolve( __dirname, diff --git a/packages/core/test/patternWrapClasses_tests.js b/packages/core/test/patternWrapClasses_tests.js index a00d06dd1..35702e570 100644 --- a/packages/core/test/patternWrapClasses_tests.js +++ b/packages/core/test/patternWrapClasses_tests.js @@ -23,7 +23,7 @@ tap.test('reading pattern wrap class from markdown', function (test) { const patternPathMarkdown = path.join( 'test', - 'pattern-wrap-class-markdown.mustache' + 'pattern-wrap-class-markdown.hbs' ); const patternMarkdown = loadPattern(patternPathMarkdown, patternlab); patternWrapClassesChangePatternTemplate(patternlab, patternMarkdown); @@ -42,7 +42,7 @@ tap.test('reading pattern wrap class from json', function (test) { patternWrapClassesKey: ['theme-class'], }; - const patternPathJson = path.join('test', 'pattern-wrap-class-json.mustache'); + const patternPathJson = path.join('test', 'pattern-wrap-class-json.hbs'); const patternJson = loadPattern(patternPathJson, patternlab); patternWrapClassesChangePatternTemplate(patternlab, patternJson); const patternPartialJson = diff --git a/packages/core/test/pattern_engines_tests.js b/packages/core/test/pattern_engines_tests.js index 3a1e78f1f..d9f70169f 100644 --- a/packages/core/test/pattern_engines_tests.js +++ b/packages/core/test/pattern_engines_tests.js @@ -8,72 +8,76 @@ var config = require('./util/patternlab-config.json'); patternEngines.loadAllEngines(config); -// the mustache test pattern, stolen from object_factory unit tests -var mustacheTestPattern = new Pattern( - 'source/_patterns/atoms/global/colors-alt.mustache', +// the handlebars test pattern, stolen from object_factory unit tests +var handlebarsTestPattern = new Pattern( + 'source/_patterns/atoms/global/colors-alt.hbs', { d: 123 } ); -var mustacheTestPseudoPatternBasePattern = new Pattern( - 'source/_patterns/pages/homepage.mustache', +var handlebarsTestPseudoPatternBasePattern = new Pattern( + 'source/_patterns/pages/homepage.hbs', { d: 123 } ); -var mustacheTestPseudoPattern = new Pattern( +var handlebarsTestPseudoPattern = new Pattern( 'source/_patterns/pages/homepage~emergency.json', { d: 123 } ); -mustacheTestPseudoPattern.isPseudoPattern = true; -mustacheTestPseudoPattern.basePattern = mustacheTestPseudoPatternBasePattern; +handlebarsTestPseudoPattern.isPseudoPattern = true; +handlebarsTestPseudoPattern.basePattern = + handlebarsTestPseudoPatternBasePattern; var engineNames = Object.keys(patternEngines); tap.test( - 'getEngineNameForPattern returns "mustache" from test pattern', + 'getEngineNameForPattern returns "handlebars" from test pattern', function (test) { - var engineName = - patternEngines.getEngineNameForPattern(mustacheTestPattern); - test.equal(engineName, 'mustache'); + var engineName = patternEngines.getEngineNameForPattern( + handlebarsTestPattern + ); + test.equal(engineName, 'handlebars'); test.end(); } ); tap.test( - 'getEngineNameForPattern returns "mustache" for a plain string template as a backwards compatibility measure', + 'getEngineNameForPattern returns "handlebars" for a plain string template as a backwards compatibility measure', function (test) { test.plan(1); test.equal( patternEngines.getEngineNameForPattern('plain text string'), - 'mustache' + 'handlebars' ); test.end(); } ); tap.test( - 'getEngineNameForPattern returns "mustache" for an artificial empty template', + 'getEngineNameForPattern returns "handlebars" for an artificial empty template', function (test) { test.plan(1); var emptyPattern = Pattern.createEmpty(); test.equal( patternEngines.getEngineNameForPattern(emptyPattern), - 'mustache' + 'handlebars' ); test.end(); } ); tap.test( - 'getEngineForPattern returns a reference to the mustache engine from test pattern', + 'getEngineForPattern returns a reference to the handlebars engine from test pattern', function (test) { - var engine = patternEngines.getEngineForPattern(mustacheTestPattern); - test.equal(engine, patternEngines.mustache); + var engine = patternEngines.getEngineForPattern(handlebarsTestPattern); + test.equal(engine, patternEngines.hbs); test.end(); } ); tap.test( - 'getEngineForPattern returns a reference to the mustache engine from test pseudo-pattern', + 'getEngineForPattern returns a reference to the handlebars engine from test pseudo-pattern', function (test) { - var engine = patternEngines.getEngineForPattern(mustacheTestPseudoPattern); - test.equal(engine, patternEngines.mustache); + var engine = patternEngines.getEngineForPattern( + handlebarsTestPseudoPattern + ); + test.equal(engine, patternEngines.hbs); test.end(); } ); @@ -116,11 +120,11 @@ tap.test( function (test) { // each test case var filenames = { - 'comment-thread.mustache': true, + 'comment-thread.hbs': true, 'comment-thread.fakeextthatdoesntexist': false, 'comment-thread': false, - '_comment-thread.mustache': true, - '.comment-thread.mustache': false, + '_comment-thread.hbs': true, + '.comment-thread.hbs': false, 'comment-thread.json': false, 'homepage~emergency.json': true, }; @@ -189,19 +193,19 @@ function testProps(object, propTests, test) { } tap.test( - 'patternEngines object contains at least the default mustache engine', + 'patternEngines object contains at least the default handlebars engine', function (test) { test.plan(1); - test.ok(patternEngines.hasOwnProperty('mustache')); + test.ok(patternEngines.hasOwnProperty('handlebars')); test.end(); } ); tap.test( - 'patternEngines object reports that it supports the .mustache extension', + 'patternEngines object reports that it supports the .hbs extension', function (test) { test.plan(1); - test.ok(patternEngines.isFileExtensionSupported('.mustache')); + test.ok(patternEngines.isFileExtensionSupported('.hbs')); test.end(); } ); diff --git a/packages/core/test/processRecursive_tests.js b/packages/core/test/processRecursive_tests.js index e9ae0c4d8..f03801e62 100644 --- a/packages/core/test/processRecursive_tests.js +++ b/packages/core/test/processRecursive_tests.js @@ -20,10 +20,10 @@ tap.test('processRecursive recursively includes partials', function (test) { //assert const patternlab = util.fakePatternLab(patterns_dir); - var fooPatternPath = path.join('test', 'foo.mustache'); + var fooPatternPath = path.join('test', 'foo.hbs'); var fooPattern = loadPattern(fooPatternPath, patternlab); - var barPatternPath = path.join('test', 'bar.mustache'); + var barPatternPath = path.join('test', 'bar.hbs'); var barPattern = loadPattern(barPatternPath, patternlab); var p1 = processIterative(fooPattern, patternlab); @@ -52,13 +52,13 @@ tap //arrange const patternlab = util.fakePatternLab(patterns_dir); - var atomPath = path.join('test', 'bar.mustache'); + var atomPath = path.join('test', 'bar.hbs'); var atomPattern = loadPattern(atomPath, patternlab); - var templatePath = path.join('test', 'foo.mustache'); + var templatePath = path.join('test', 'foo.hbs'); var templatePattern = loadPattern(templatePath, patternlab); - var pagesPath = path.join('test', 'inception.mustache'); + var pagesPath = path.join('test', 'inception.hbs'); var pagesPattern = loadPattern(pagesPath, patternlab); var p1 = processIterative(atomPattern, patternlab); @@ -114,10 +114,10 @@ tap.test('hidden patterns can be called by their nice names', function (test) { const patternlab = util.fakePatternLab(patterns_dir); //act - var hiddenPatternPath = path.join('test', '_hidden-pattern.mustache'); + var hiddenPatternPath = path.join('test', '_hidden-pattern.hbs'); var hiddenPattern = loadPattern(hiddenPatternPath, patternlab); - var testPatternPath = path.join('test', 'hidden-pattern-tester.mustache'); + var testPatternPath = path.join('test', 'hidden-pattern-tester.hbs'); var testPattern = loadPattern(testPatternPath, patternlab); var p1 = processIterative(hiddenPattern, patternlab); @@ -149,7 +149,7 @@ tap.test( //arrange var pl = util.fakePatternLab(patterns_dir); - var testPatternPath = path.join('test', 'bar.mustache'); + var testPatternPath = path.join('test', 'bar.hbs'); var testPattern = loadPattern(testPatternPath, pl); //act @@ -176,7 +176,7 @@ tap.test( //arrange var pl = util.fakePatternLab(patterns_dir); - var testPatternPath = path.join('test', 'bar.mustache'); + var testPatternPath = path.join('test', 'bar.hbs'); var testPattern = loadPattern(testPatternPath, pl); //act diff --git a/packages/core/test/pseudopattern_hunter_tests.js b/packages/core/test/pseudopattern_hunter_tests.js index 1f9c5e541..0c0faced8 100644 --- a/packages/core/test/pseudopattern_hunter_tests.js +++ b/packages/core/test/pseudopattern_hunter_tests.js @@ -46,7 +46,7 @@ tap.test('pseudpattern found and added as a pattern', function (test) { //arrange var pl = stubPatternlab(); - var atomPattern = loadPattern('test/styled-atom.mustache', pl); + var atomPattern = loadPattern('test/styled-atom.hbs', pl); addPattern(atomPattern, pl); //act @@ -70,7 +70,7 @@ tap.test('pseudpattern does not pollute base pattern data', function (test) { //arrange var pl = stubPatternlab(); - var atomPattern = loadPattern('test/styled-atom.mustache', pl); + var atomPattern = loadPattern('test/styled-atom.hbs', pl); //act var patternCountBefore = pl.patterns.length; @@ -88,18 +88,18 @@ tap.test('pseudpattern variant includes parameteredPartials', function (test) { //arrange var pl = stubPatternlab(); - var atomPattern = new Pattern('test/styled-atom.mustache'); + var atomPattern = new Pattern('test/styled-atom.hbs'); atomPattern.template = fs.readFileSync( - patterns_dir + 'test/styled-atom.mustache', + patterns_dir + 'test/styled-atom.hbs', 'utf8' ); atomPattern.extendedTemplate = atomPattern.template; atomPattern.parameteredPartials = atomPattern.findPartialsWithPatternParameters(atomPattern); - var pseudoPattern = new Pattern('test/pseudomodifier.mustache'); + var pseudoPattern = new Pattern('test/pseudomodifier.hbs'); pseudoPattern.template = fs.readFileSync( - patterns_dir + 'test/pseudomodifier.mustache', + patterns_dir + 'test/pseudomodifier.hbs', 'utf8' ); pseudoPattern.extendedTemplate = atomPattern.template; @@ -124,7 +124,7 @@ tap.test('pseudo pattern variant data should merge arrays', function (test) { const pl = stubPatternlab(); pl.config.patternMergeVariantArrays = true; - const pattern = loadPattern('test/variant-test.mustache', pl); + const pattern = loadPattern('test/variant-test.hbs', pl); addPattern(pattern, pl); @@ -146,7 +146,7 @@ tap.test( function (test) { const pl = stubPatternlab(); - const pattern = loadPattern('test/variant-test.mustache', pl); + const pattern = loadPattern('test/variant-test.hbs', pl); addPattern(pattern, pl); @@ -168,7 +168,7 @@ tap.test('pseudo pattern variant data should override arrays', function (test) { const pl = stubPatternlab(); pl.config.patternMergeVariantArrays = false; - const pattern = loadPattern('test/variant-test.mustache', pl); + const pattern = loadPattern('test/variant-test.hbs', pl); addPattern(pattern, pl); diff --git a/packages/core/test/ui_builder_tests.js b/packages/core/test/ui_builder_tests.js index 1070151d6..0de5549c9 100644 --- a/packages/core/test/ui_builder_tests.js +++ b/packages/core/test/ui_builder_tests.js @@ -72,7 +72,7 @@ tap.test( function (test) { //arrange var patternlab = createFakePatternLab({}); - var pattern = new Pattern('test/ignored-pattern.mustache'); + var pattern = new Pattern('test/ignored-pattern.hbs'); pattern.hidden = true; //act @@ -89,7 +89,7 @@ tap.test( function (test) { //arrange var patternlab = createFakePatternLab({}); - var pattern = new Pattern('test/foo.mustache'); + var pattern = new Pattern('test/foo.hbs'); patternlab.config.defaultPattern = 'test-foo'; //act @@ -113,9 +113,9 @@ tap.test( path.sep + 'patternSubgroup' + path.sep + - 'foo.mustache', + 'foo.hbs', isPattern: true, - fileName: 'foo.mustache', + fileName: 'foo.hbs', patternPartial: 'hidden-foo', }); @@ -138,10 +138,9 @@ tap.test( //arrange var patternlab = createFakePatternLab({}); var pattern = Pattern.createEmpty({ - relPath: - 'shown' + path.sep + 'patternsubtype' + path.sep + 'foo.mustache', + relPath: 'shown' + path.sep + 'patternsubtype' + path.sep + 'foo.hbs', isPattern: true, - fileName: 'foo.mustache', + fileName: 'foo.hbs', patternPartial: 'shown-foo', }); @@ -164,10 +163,9 @@ tap.test( //arrange var patternlab = createFakePatternLab({}); var pattern = Pattern.createEmpty({ - relPath: - 'shown' + path.sep + '_patternSubgroup' + path.sep + 'foo.mustache', + relPath: 'shown' + path.sep + '_patternSubgroup' + path.sep + 'foo.hbs', isPattern: true, - fileName: 'foo.mustache', + fileName: 'foo.hbs', patternPartial: 'shown-foo', patternState: 'complete', }); @@ -192,15 +190,15 @@ tap.test('groupPatterns - creates pattern groups correctly', function (test) { }); patternlab.patterns.push( - new Pattern('foobar.mustache'), - new Pattern('test/bar.mustache'), - new Pattern('test/foo.mustache'), - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache'), - new Pattern('patternGroup1/patternSubgroup2/black.mustache'), - new Pattern('patternGroup1/patternSubgroup2/grey.mustache'), - new Pattern('patternGroup1/patternSubgroup2/white.mustache') + new Pattern('foobar.hbs'), + new Pattern('test/bar.hbs'), + new Pattern('test/foo.hbs'), + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs'), + new Pattern('patternGroup1/patternSubgroup2/black.hbs'), + new Pattern('patternGroup1/patternSubgroup2/grey.hbs'), + new Pattern('patternGroup1/patternSubgroup2/white.hbs') ); ui.resetUIBuilderState(patternlab); @@ -274,9 +272,9 @@ tap.test( // Should be sorted by order and secondly by name patternlab.patterns.push( - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/blue.mustache') + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/blue.hbs') ); ui.resetUIBuilderState(patternlab); @@ -316,9 +314,9 @@ tap.test( }); patternlab.patterns.push( - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache') + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs') ); ui.resetUIBuilderState(patternlab); @@ -357,9 +355,9 @@ tap.test( }); patternlab.patterns.push( - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache') + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs') ); ui.resetUIBuilderState(patternlab); @@ -404,14 +402,14 @@ tap.test( }); patternlab.patterns.push( - new Pattern('test/foo.mustache'), - new Pattern('test/bar.mustache'), - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache'), - new Pattern('patternGroup1/patternSubgroup2/black.mustache'), - new Pattern('patternGroup1/patternSubgroup2/grey.mustache'), - new Pattern('patternGroup1/patternSubgroup2/white.mustache') + new Pattern('test/foo.hbs'), + new Pattern('test/bar.hbs'), + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs'), + new Pattern('patternGroup1/patternSubgroup2/black.hbs'), + new Pattern('patternGroup1/patternSubgroup2/grey.hbs'), + new Pattern('patternGroup1/patternSubgroup2/white.hbs') ); ui.resetUIBuilderState(patternlab); @@ -447,14 +445,14 @@ tap.test( }); patternlab.patterns.push( - new Pattern('test/foo.mustache'), - new Pattern('test/bar.mustache'), - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache'), - new Pattern('patternGroup1/patternSubgroup2/black.mustache'), - new Pattern('patternGroup1/patternSubgroup2/grey.mustache'), - new Pattern('patternGroup1/patternSubgroup2/white.mustache') + new Pattern('test/foo.hbs'), + new Pattern('test/bar.hbs'), + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs'), + new Pattern('patternGroup1/patternSubgroup2/black.hbs'), + new Pattern('patternGroup1/patternSubgroup2/grey.hbs'), + new Pattern('patternGroup1/patternSubgroup2/white.hbs') ); ui.resetUIBuilderState(patternlab); @@ -504,14 +502,14 @@ tap.test( }); patternlab.patterns.push( - new Pattern('test/foo.mustache'), - new Pattern('test/bar.mustache'), - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache'), - new Pattern('patternGroup1/patternSubgroup2/black.mustache'), - new Pattern('patternGroup1/patternSubgroup2/grey.mustache'), - new Pattern('patternGroup1/patternSubgroup2/white.mustache') + new Pattern('test/foo.hbs'), + new Pattern('test/bar.hbs'), + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs'), + new Pattern('patternGroup1/patternSubgroup2/black.hbs'), + new Pattern('patternGroup1/patternSubgroup2/grey.hbs'), + new Pattern('patternGroup1/patternSubgroup2/white.hbs') ); ui.resetUIBuilderState(patternlab); @@ -560,13 +558,13 @@ tap.test( patternlab.patterns.push( //this flat pattern is found and causes trouble for the rest of the crew - new Pattern('test/foo.mustache'), - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache'), - new Pattern('patternGroup1/patternSubgroup2/black.mustache'), - new Pattern('patternGroup1/patternSubgroup2/grey.mustache'), - new Pattern('patternGroup1/patternSubgroup2/white.mustache') + new Pattern('test/foo.hbs'), + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs'), + new Pattern('patternGroup1/patternSubgroup2/black.hbs'), + new Pattern('patternGroup1/patternSubgroup2/grey.hbs'), + new Pattern('patternGroup1/patternSubgroup2/white.hbs') ); ui.resetUIBuilderState(patternlab); @@ -584,8 +582,8 @@ tap.test( // within _.forOwn(...) loops, causing premature termination of the entire loop // when what was intended was a continue // we expect 10 here because: - // - foo.mustache is flat and therefore does not have a viewall page - // - the colors.mustache files make 6 + // - foo.hbs is flat and therefore does not have a viewall page + // - the colors.hbs files make 6 // - patternSubgroup1 and patternSubgroup2 make 8 // - the general view all page make 9 // while most of that heavy lifting occurs inside groupPatterns and not buildViewAllPages, @@ -630,13 +628,13 @@ tap.test( patternlab.patterns.push( //this flat pattern is found and causes trouble for the rest of the crew - new Pattern('test/foo.mustache'), - new Pattern('patternGroup1/patternSubgroup1/blue.mustache'), - new Pattern('patternGroup1/patternSubgroup1/red.mustache'), - new Pattern('patternGroup1/patternSubgroup1/yellow.mustache'), - new Pattern('patternGroup1/patternSubgroup2/black.mustache'), - new Pattern('patternGroup1/patternSubgroup2/grey.mustache'), - new Pattern('patternGroup1/patternSubgroup2/white.mustache') + new Pattern('test/foo.hbs'), + new Pattern('patternGroup1/patternSubgroup1/blue.hbs'), + new Pattern('patternGroup1/patternSubgroup1/red.hbs'), + new Pattern('patternGroup1/patternSubgroup1/yellow.hbs'), + new Pattern('patternGroup1/patternSubgroup2/black.hbs'), + new Pattern('patternGroup1/patternSubgroup2/grey.hbs'), + new Pattern('patternGroup1/patternSubgroup2/white.hbs') ); ui.resetUIBuilderState(patternlab); @@ -654,8 +652,8 @@ tap.test( // within _.forOwn(...) loops, causing premature termination of the entire loop // when what was intended was a continue // we expect 8 here because: - // - foo.mustache is flat and therefore does not have a viewall page - // - the colors.mustache files make 6 + // - foo.hbs is flat and therefore does not have a viewall page + // - the colors.hbs files make 6 // - patternSubgroup1 and patternSubgroup2 make 8 // - the general view all page make 9 // - the view-all page of test and test-foo make 11 diff --git a/packages/core/test/util/patternlab-config.json b/packages/core/test/util/patternlab-config.json index e101b2ad4..6530433da 100644 --- a/packages/core/test/util/patternlab-config.json +++ b/packages/core/test/util/patternlab-config.json @@ -7,12 +7,12 @@ "meta": "./test/files/_meta/", "styleguide": "./test/files/styleguide/", "patternlabFiles": { - "general-header": "views/partials/general-header.mustache", - "general-footer": "views/partials/general-footer.mustache", - "patternSection": "views/partials/patternSection.mustache", + "general-header": "views/partials/general-header.hbs", + "general-footer": "views/partials/general-footer.hbs", + "patternSection": "views/partials/patternSection.hbs", "patternSectionSubgroup": - "views/partials/patternSectionSubgroup.mustache", - "viewall": "views/viewall.mustache" + "views/partials/patternSectionSubgroup.hbs", + "viewall": "views/viewall.hbs" }, "js": "./test/files/js", "images": "./test/files/images", @@ -56,7 +56,7 @@ "patternStates": {}, "patternExportPatternPartials": [], "patternExportDirectory": "./pattern_exports/", - "patternExtension": "mustache", + "patternExtension": "hbs", "patternMergeVariantArrays": true, "renderFlatPatternsOnViewAllPages": false, "cacheBust": true, diff --git a/packages/core/test/watchPatternLabFiles_tests.js b/packages/core/test/watchPatternLabFiles_tests.js index 0dcc7fbc1..f1fa8e823 100644 --- a/packages/core/test/watchPatternLabFiles_tests.js +++ b/packages/core/test/watchPatternLabFiles_tests.js @@ -19,7 +19,7 @@ tap.test( }); pl.engines.getSupportedFileExtensions = () => { - return ['.mustache']; + return ['.hbs', '.handlebars']; }; watchPatternLabFiles( @@ -36,8 +36,8 @@ tap.test( ); // should have two for _data and _meta - // should have five for '.json', '.yml', '.yaml', '.md' and '.mustache' - test.equal(Object.keys(pl.watchers).length, 7); + // should have five for '.json', '.yml', '.yaml', '.md', '.hbs' and '.handlebars' + test.equal(Object.keys(pl.watchers).length, 8); test.end(); } diff --git a/packages/development-edition-engine-handlebars/package.json b/packages/development-edition-engine-handlebars/package.json index dbdccb71b..a838066c9 100644 --- a/packages/development-edition-engine-handlebars/package.json +++ b/packages/development-edition-engine-handlebars/package.json @@ -32,7 +32,6 @@ "@pattern-lab/cli": "^6.0.1", "@pattern-lab/core": "^6.0.1", "@pattern-lab/engine-handlebars": "^6.0.0", - "@pattern-lab/engine-mustache": "^6.0.0", "@pattern-lab/plugin-tab": "^6.0.0", "@pattern-lab/starterkit-handlebars-demo": "^6.0.0", "@pattern-lab/uikit-workshop": "^6.0.3" diff --git a/packages/development-edition-engine-handlebars/patternlab-config.json b/packages/development-edition-engine-handlebars/patternlab-config.json index a8873d362..f599ae113 100644 --- a/packages/development-edition-engine-handlebars/patternlab-config.json +++ b/packages/development-edition-engine-handlebars/patternlab-config.json @@ -49,11 +49,11 @@ "annotations": "source/_annotations/", "styleguide": "dist/", "patternlabFiles": { - "general-header": "views/partials/general-header.mustache", - "general-footer": "views/partials/general-footer.mustache", - "patternSection": "views/partials/patternSection.mustache", - "patternSectionSubgroup": "views/partials/patternSectionSubgroup.mustache", - "viewall": "views/viewall.mustache" + "general-header": "views/partials/general-header.hbs", + "general-footer": "views/partials/general-footer.hbs", + "patternSection": "views/partials/patternSection.hbs", + "patternSectionSubgroup": "views/partials/patternSectionSubgroup.hbs", + "viewall": "views/viewall.hbs" }, "js": "source/js", "images": "source/images", diff --git a/packages/development-edition-engine-handlebars/source/_meta/_foot.mustache b/packages/development-edition-engine-handlebars/source/_meta/_foot.mustache deleted file mode 100644 index 98d360860..000000000 --- a/packages/development-edition-engine-handlebars/source/_meta/_foot.mustache +++ /dev/null @@ -1,9 +0,0 @@ - - - - - {{{ patternLabFoot }}} - - - - diff --git a/packages/development-edition-engine-handlebars/source/_meta/_head.mustache b/packages/development-edition-engine-handlebars/source/_meta/_head.mustache deleted file mode 100644 index 76899a54a..000000000 --- a/packages/development-edition-engine-handlebars/source/_meta/_head.mustache +++ /dev/null @@ -1,18 +0,0 @@ - - - - {{ title }} - - - - - - - - - {{{ patternLabHead }}} - - - - - diff --git a/packages/development-edition-engine-react/package.json b/packages/development-edition-engine-react/package.json index 1f76d3770..111494ed5 100644 --- a/packages/development-edition-engine-react/package.json +++ b/packages/development-edition-engine-react/package.json @@ -6,7 +6,6 @@ "main": "gulpfile.js", "dependencies": { "@pattern-lab/core": "^6.0.1", - "@pattern-lab/engine-mustache": "^6.0.0", "@pattern-lab/engine-react": "^6.0.0", "@pattern-lab/uikit-workshop": "^6.0.3", "gulp": "4.0.2", diff --git a/packages/development-edition-engine-react/patternlab-config.json b/packages/development-edition-engine-react/patternlab-config.json index 23f8673e8..80ee476ea 100644 --- a/packages/development-edition-engine-react/patternlab-config.json +++ b/packages/development-edition-engine-react/patternlab-config.json @@ -41,15 +41,15 @@ "styleguide": "./node_modules/@pattern-lab/uikit-workshop/dist/", "patternlabFiles": { "general-header": - "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-header.mustache", + "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-header.hbs", "general-footer": - "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-footer.mustache", + "./node_modules/@pattern-lab/uikit-workshop/views/partials/general-footer.hbs", "patternSection": - "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSection.mustache", + "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSection.hbs", "patternSectionSubgroup": - "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSectionSubgroup.mustache", + "./node_modules/@pattern-lab/uikit-workshop/views/partials/patternSectionSubgroup.hbs", "viewall": - "./node_modules/@pattern-lab/uikit-workshop/views/viewall.mustache" + "./node_modules/@pattern-lab/uikit-workshop/views/viewall.hbs" }, "js" : "./source/js", "images" : "./source/images", @@ -68,7 +68,7 @@ "css" : "./public/css" } }, - "patternExtension": "mustache", + "patternExtension": "hbs", "patternStateCascade": ["inprogress", "inreview", "complete"], "patternExportAll": false, "patternExportPreserveDirectoryStructure": false, diff --git a/packages/development-edition-engine-twig/patternlab-config.json b/packages/development-edition-engine-twig/patternlab-config.json index c50ccbcda..9471698f0 100644 --- a/packages/development-edition-engine-twig/patternlab-config.json +++ b/packages/development-edition-engine-twig/patternlab-config.json @@ -49,11 +49,11 @@ "annotations": "source/_annotations/", "styleguide": "dist/", "patternlabFiles": { - "general-header": "views/partials/general-header.mustache", - "general-footer": "views/partials/general-footer.mustache", - "patternSection": "views/partials/patternSection.mustache", - "patternSectionSubgroup": "views/partials/patternSectionSubgroup.mustache", - "viewall": "views/viewall.mustache" + "general-header": "views/partials/general-header.hbs", + "general-footer": "views/partials/general-footer.hbs", + "patternSection": "views/partials/patternSection.hbs", + "patternSectionSubgroup": "views/partials/patternSectionSubgroup.hbs", + "viewall": "views/viewall.hbs" }, "js": "source/js", "images": "source/images", diff --git a/packages/docs/src/docs/advanced-config-options.md b/packages/docs/src/docs/advanced-config-options.md index 460b79395..2b5fad263 100644 --- a/packages/docs/src/docs/advanced-config-options.md +++ b/packages/docs/src/docs/advanced-config-options.md @@ -57,7 +57,7 @@ Possibility to define whether the initial viewport width on opening pattern lab Sets default active pattern info code panel by file extension - if unset, uses the value out of _patternExtension_ config value, or instead use value `html` to display the html code initially, or the value defined for the _patternExtension_. -**default**: _patternExtension_ value (`"hbs"` | `"mustache"` | `"twig"` | `"html"`) +**default**: _patternExtension_ value (`"hbs"` | `"twig"` | `"html"`) ## ishControlsHide @@ -149,11 +149,11 @@ Sets the configurable source and public directories for files Pattern Lab Node o "annotations": "./source/_annotations/", "styleguide": "dist/", "patternlabFiles": { - "general-header": "views/partials/general-header.mustache", - "general-footer": "views/partials/general-footer.mustache", - "patternSection": "views/partials/patternSection.mustache", - "patternSectionSubgroup": "views/partials/patternSectionSubgroup.mustache", - "viewall": "views/viewall.mustache" + "general-header": "views/partials/general-header.hbs", + "general-footer": "views/partials/general-footer.hbs", + "patternSection": "views/partials/patternSection.hbs", + "patternSectionSubgroup": "views/partials/patternSectionSubgroup.hbs", + "viewall": "views/viewall.hbs" }, "js": "./source/js", "images": "./source/images", @@ -178,7 +178,7 @@ Sets the configurable source and public directories for files Pattern Lab Node o Sets the panel name and language for the code tab on the styleguide. Since this only accepts one value, this is a place where mixed pattern trees (different PatternEngines in the same instance of Pattern Lab) does not quite work. -**default**: `mustache` +**default**: `hbs` ## engines diff --git a/packages/docs/src/docs/advanced-ecosystem-overview.md b/packages/docs/src/docs/advanced-ecosystem-overview.md index 74d95894e..ea422180b 100644 --- a/packages/docs/src/docs/advanced-ecosystem-overview.md +++ b/packages/docs/src/docs/advanced-ecosystem-overview.md @@ -44,7 +44,7 @@ UIKits are the front-end of Pattern Lab. We call this “The Viewer.” UIKits a ### PatternEngines -PatternEngines are the templating engines that are responsible for parsing patterns and turning them into HTML. PatternEngines give Pattern Lab Core the flexibility to render many different types of template languages. Current PatternEngines include Mustache and Twig, with others like Handlebars and Underscore in development. And there’s no stopping you from adding another templating engine to Pattern Lab. +PatternEngines are the templating engines that are responsible for parsing patterns and turning them into HTML. PatternEngines give Pattern Lab Core the flexibility to render many different types of template languages. Current PatternEngines include Handlebars and Twig, with others like React and Underscore in development. And there’s nothing stopping you from adding another templating engine to Pattern Lab. ### Plugins diff --git a/packages/docs/src/docs/advanced-keyboard-shortcuts.md b/packages/docs/src/docs/advanced-keyboard-shortcuts.md index e2fddd3c1..454a638e0 100644 --- a/packages/docs/src/docs/advanced-keyboard-shortcuts.md +++ b/packages/docs/src/docs/advanced-keyboard-shortcuts.md @@ -10,7 +10,7 @@ eleventyNavigation: sitemapPriority: '0.8' --- -> **Note:** This feature is currently disabled. It will be back in a future release of `styleguidekit-assets-default`. +> **Note:** This feature is currently disabled. It will be back in a future release of `uikit-workshop`. Pattern Lab comes with support for a number of special keyboard shortcuts to make using Pattern Lab easier. These are broken up by where they work or are most useful. @@ -28,7 +28,7 @@ Modifying the views: - **ctrl+shift+a**: open/close info panels - **ctrl+shift+c**: open/close info panels - **cmd+a/ctrl+a**: select the content of the current open tab in code view -- **ctrl+shift+u**: make the Mustache tab active +- **ctrl+shift+u**: make the Handlebars tab active - **ctrl+shift+y**: make the HTML tab active - **esc**: close the open view diff --git a/packages/docs/src/docs/advanced-starterkits.md b/packages/docs/src/docs/advanced-starterkits.md index 87777da66..6059f24bc 100644 --- a/packages/docs/src/docs/advanced-starterkits.md +++ b/packages/docs/src/docs/advanced-starterkits.md @@ -44,8 +44,8 @@ where [starterkit-name] is the name of the Starterkit. so... a complete example: ``` -npm install @pattern-lab/starterkit-mustache-demo -gulp patternlab:loadstarterkit --kit=@pattern-lab/starterkit-mustache-demo +npm install @pattern-lab/starterkit-handlebars-demo +gulp patternlab:loadstarterkit --kit=@pattern-lab/starterkit-handlebars-demo ``` The [Pattern Lab Node CLI](https://github.com/pattern-lab/patternlab-node/tree/master/packages/cli) will also support installation of Starterkits should you not be using gulp. diff --git a/packages/docs/src/docs/advanced-template-language-and-pattern-engines.md b/packages/docs/src/docs/advanced-template-language-and-pattern-engines.md index 0ad36ebe3..3845a6221 100644 --- a/packages/docs/src/docs/advanced-template-language-and-pattern-engines.md +++ b/packages/docs/src/docs/advanced-template-language-and-pattern-engines.md @@ -10,9 +10,9 @@ eleventyNavigation: sitemapPriority: '0.8' --- -By default Pattern Lab uses the Mustache template language, extended with [pattern parameters](/docs/using-pattern-parameters/). PatternEngines let you add support for a template language of your personal choice. Each PatternEngine has it's own set of features and caveats. +By default Pattern Lab uses the Handlebars template language, that uses template specific functionality like [partial parameters](https://handlebarsjs.com/guide/partials.html#partial-parameters) (whereas e.g. Mustache previously got an extension with [pattern parameters](/docs/using-pattern-parameters/#heading-the-pattern-parameter-syntax)). PatternEngines let you add support for a template language of your personal choice. Each PatternEngine has it's own set of features and caveats. -Right now the most mature PatternEngines are Handlebars, Mustache and Twig. +Right now the most mature PatternEngines are Handlebars and Twig. ## Official PatternEngines for Node diff --git a/packages/docs/src/docs/data-json-mustache.md b/packages/docs/src/docs/data-json-mustache.md index 1e6b5689f..223e15faa 100644 --- a/packages/docs/src/docs/data-json-mustache.md +++ b/packages/docs/src/docs/data-json-mustache.md @@ -1,16 +1,16 @@ --- -title: Introduction to JSON & Mustache Variables +title: Introduction to JSON & Handlebars Variables tags: - docs category: data eleventyNavigation: - title: Introduction to JSON & Mustache Variables + title: Introduction to JSON & Handlebars Variables key: data order: 300 sitemapPriority: '0.8' --- -> This documentation is provided as a simple introduction to using one of the supported data types and one of the supported PatternEngines. The best reference for this topic is the [Mustache documentation](https://mustache.github.io/mustache.5.html) but this should provide a good beginner's primer. +> This documentation is provided as a simple introduction to using one of the supported data types and one of the supported PatternEngines. The best reference for this topic is the [Handlebars documentation](https://handlebarsjs.com/contributing/interactive-examples.html#embedding-parts-of-an-example) but this should provide a good beginner's primer. ## Simple Variables @@ -20,13 +20,13 @@ At its core JSON is a simple key-value store. This means that any piece of data "src": "../../images/fpo_avatar.png" ``` -In this case the key is `src` and the value is `../../images/fpo_avatar.png`. Let's look at how we might reference this data in a pattern template. Mustache variables are denoted by the double-curly braces (or mustaches). +In this case the key is `src` and the value is `../../images/fpo_avatar.png`. Let's look at how we might reference this data in a pattern template. Handlebars variables are denoted by the double-curly braces (or mustaches). ```html Avatar ``` -The Mustache variable is `{% raw %}{{ src }}{% endraw %}`. Note that `src` matches the name of the key in our JSON example. When the Node version of Pattern Lab compile this template the end result will be: +The Handlebars variable is `{% raw %}{{ src }}{% endraw %}`. Note that `src` matches the name of the key in our JSON example. When the Node version of Pattern Lab compile this template the end result will be: ```html Avatar @@ -36,7 +36,7 @@ Note that `{% raw %}{{ src }}{% endraw %}` was replaced by the value for `src` f ## Nested Variables -We may want our JSON file to be a little more organized and our Mustache variable names to be a little more descriptive. For example, maybe we have multiple image sizes that we want to provide image sources for. We might organize our JSON key-values this way: +We may want our JSON file to be a little more organized and our Handlebars variable names to be a little more descriptive. For example, maybe we have multiple image sizes that we want to provide image sources for. We might organize our JSON key-values this way: ```javascript "square": { @@ -74,13 +74,13 @@ This nesting makes it easier to read how the attributes are organized in our pat ## Rendering HTML in Variables -You may want to include HTML in your variables. By default, Mustache will convert HTML mark-up to their HTML entity equivalents. For example, our JSON may look like: +You may want to include HTML in your variables. By default, Handlebars will convert HTML mark-up to their HTML entity equivalents. For example, our JSON may look like: ```javascript "lyrics": "Just good ol' boys, wouldn't change if they could, fightin' the system like a true modern day Robin Hood." ``` -Based on our previous Mustache examples you would probably write out your template like so: +Based on our previous Handlebars examples you would probably write out your template like so: ```html

TV Show Lyrics

diff --git a/packages/docs/src/docs/data-overview.md b/packages/docs/src/docs/data-overview.md index c4d0a0a38..6e44f9f2e 100644 --- a/packages/docs/src/docs/data-overview.md +++ b/packages/docs/src/docs/data-overview.md @@ -24,7 +24,7 @@ There are three places to store data in Pattern Lab: - in [pattern-specific](/docs/creating-pattern-specific-values/) files in `./source/_patterns`. - in [pseudo-pattern](/docs/using-pseudo-patterns/) files in `./source/_patterns`. -### A Special Note About Pattern Parameters +### A Special Note About Pattern Parameters (Mustache engine) [Pattern parameters](/docs/using-pattern-parameters/) are a simple find and replace of variables in the included pattern. As such they do not affect the context stack of Mustache and we don't consider them true data. They have no impact on overall data inheritance and they cannot be used any deeper than the included pattern. They are a hack. diff --git a/packages/docs/src/docs/data-pattern-specific.md b/packages/docs/src/docs/data-pattern-specific.md index d2863fa49..e43c0b4e1 100644 --- a/packages/docs/src/docs/data-pattern-specific.md +++ b/packages/docs/src/docs/data-pattern-specific.md @@ -19,7 +19,7 @@ Storing data for your atoms, molecules, and organisms in `./source/_data` may wo In order to tell the Node version of Pattern Lab to use pattern-specific data to override the default global data create a JSON file with the same name as the pattern and put it in the same directory as the pattern. For example, if you wanted to provide pattern-specific data for the `article` pattern under the pattern type `pages` your `pages` directory would look like this: ``` -pages/article.mustache +pages/article.hbs pages/article.json ``` diff --git a/packages/docs/src/docs/editing-source-files.md b/packages/docs/src/docs/editing-source-files.md index a4755fc6f..1fb5012c6 100644 --- a/packages/docs/src/docs/editing-source-files.md +++ b/packages/docs/src/docs/editing-source-files.md @@ -51,28 +51,34 @@ In the Node version of Pattern Lab you can modify the following configuration op ```javascript "paths" : { "source" : { - "root": "./source/", - "patterns" : "./source/_patterns/", - "data" : "./source/_data/", - "meta": "./source/_meta/", - "annotations" : "./source/_annotations/", - "styleguide" : "./node_modules/styleguidekit-assets-default/dist/", - "patternlabFiles" : "./node_modules/styleguidekit-mustache-default/views/", - "js" : "./source/js", - "images" : "./source/images", - "fonts" : "./source/fonts", - "css" : "./source/css/" + "root": "source/", + "patterns" : "source/_patterns/", + "data" : "source/_data/", + "meta": "source/_meta/", + "annotations" : "source/_annotations/", + "styleguide" : "dist/", + "patternlabFiles": { + "general-header": "views/partials/general-header.hbs", + "general-footer": "views/partials/general-footer.hbs", + "patternSection": "views/partials/patternSection.hbs", + "patternSectionSubgroup": "views/partials/patternSectionSubgroup.hbs", + "viewall": "views/viewall.hbs" + }, + "js" : "source/js", + "images" : "source/images", + "fonts" : "source/fonts", + "css" : "source/css" }, "public" : { - "root" : "./public/", - "patterns" : "./public/patterns/", - "data" : "./public/styleguide/data/", - "annotations" : "./public/annotations/", - "styleguide" : "./public/styleguide/", - "js" : "./public/js", - "images" : "./public/images", - "fonts" : "./public/fonts", - "css" : "./public/css" + "root" : "public/", + "patterns" : "public/patterns/", + "data" : "public/styleguide/data/", + "annotations" : "public/annotations/", + "styleguide" : "public/styleguide/", + "js" : "public/js", + "images" : "public/images", + "fonts" : "public/fonts", + "css" : "public/css" } } ``` diff --git a/packages/docs/src/docs/pattern-add-new.md b/packages/docs/src/docs/pattern-add-new.md index bad9986f2..6cc2a2545 100644 --- a/packages/docs/src/docs/pattern-add-new.md +++ b/packages/docs/src/docs/pattern-add-new.md @@ -11,17 +11,17 @@ sitemapPriority: '0.8' sitemapChangefreq: 'monthly' --- -To add new patterns to the Node version of Pattern Lab just add new Mustache templates under the appropriate pattern type or pattern subgroup directories in `./source/_patterns`. For example, let's add a new pattern under the pattern type "molecules" and the pattern sub-type "blocks". The `./source/_patterns/molecules/blocks/` directory looks like: +To add new patterns to the Node version of Pattern Lab just add new Handlebars templates under the appropriate pattern type or pattern subgroup directories in `./source/_patterns`. For example, let's add a new pattern under the pattern type "molecules" and the pattern sub-type "blocks". The `./source/_patterns/molecules/blocks/` directory looks like: - block-hero.mustache - headline-byline.mustache - media-block.mustache + block-hero.hbs + headline-byline.hbs + media-block.hbs If we want to add a new pattern we simply tack it onto the end: - block-hero.mustache - headline-byline.mustache - media-block.mustache - new-pattern.mustache + block-hero.hbs + headline-byline.hbs + media-block.hbs + new-pattern.hbs If you want more control over their ordering please refer to "[Reorganizing Patterns](/docs/reorganizing-patterns/)." diff --git a/packages/docs/src/docs/pattern-documenting.md b/packages/docs/src/docs/pattern-documenting.md index e0bddca33..c30e9c667 100644 --- a/packages/docs/src/docs/pattern-documenting.md +++ b/packages/docs/src/docs/pattern-documenting.md @@ -33,7 +33,7 @@ The `description` is used in the styleguide views. Pattern documentation needs to have a `.md` file extension and match the name of the pattern it's documenting. For example, to document the following pattern: - atoms/images/landscape-16x9.mustache + atoms/images/landscape-16x9.hbs We'd name our documentation file: @@ -46,7 +46,7 @@ To add documentation to [pseudo-patterns](/docs/using-pseudo-patterns/), create For example, to document the following pseudo-pattern: ``` -atoms/button/button~red.mustache +atoms/button/button~red.hbs ``` We'd name our documentation file: diff --git a/packages/docs/src/docs/pattern-header-footer.md b/packages/docs/src/docs/pattern-header-footer.md index b7f561995..e9a2787f7 100644 --- a/packages/docs/src/docs/pattern-header-footer.md +++ b/packages/docs/src/docs/pattern-header-footer.md @@ -13,8 +13,8 @@ sitemapChangefreq: 'monthly' To add your own assets like JavaScript and CSS to your patterns' header and footer you need to modify two files: -- `./source/_meta/_head.mustache` -- `./source/_meta/_foot.mustache` +- `./source/_meta/_head.hbs` +- `./source/_meta/_foot.hbs` These files are added to every rendered pattern, "view all" page and style guide. To see your changes simply re-generate your site. @@ -22,7 +22,7 @@ These files are added to every rendered pattern, "view all" page and style guide **Do not remove the following two lines in these patterns:** -- a tag referencing `patternLabHead` in `_head.mustache` -- a tag referencing `patternLabFoot` in `_foot.mustache` +- a tag referencing `patternLabHead` in `_head.hbs` +- a tag referencing `patternLabFoot` in `_foot.hbs` Pattern Lab will not so mysteriously stop working if you do. diff --git a/packages/docs/src/docs/pattern-hiding.md b/packages/docs/src/docs/pattern-hiding.md index e511bed4f..d8eec5bd2 100644 --- a/packages/docs/src/docs/pattern-hiding.md +++ b/packages/docs/src/docs/pattern-hiding.md @@ -13,7 +13,7 @@ sitemapChangefreq: 'monthly' Removing a pattern from Pattern Lab's drop-down navigation and style guide is accomplished by setting the `hidden` frontmatter key on any pattern's companion `.md` file. For example, we may have a Google Map-based pattern that we don't need for a particular project. The path might look like: - molecules/media/map.mustache + molecules/media/map.hbs We would create or edit a file in the same location, calling it `map.md`: diff --git a/packages/docs/src/docs/pattern-including.md b/packages/docs/src/docs/pattern-including.md index 7e60fa338..20c2d5722 100644 --- a/packages/docs/src/docs/pattern-including.md +++ b/packages/docs/src/docs/pattern-including.md @@ -14,7 +14,7 @@ sitemapChangefreq: 'monthly' To include one pattern within another, for example to create a molecule from several atoms, you can either use: - a shorthand include syntax or -- the default include syntax for the template language you're using (e.g. Mustache, Twig, Handlebars). +- the default include syntax for the template language you're using (e.g. Handlebars, Twig). ## The Shorthand Include Syntax @@ -24,7 +24,7 @@ The shorthand include syntax is less verbose than the default include syntax for For example, to include the following pattern in a molecule: - atoms/images/landscape-16x9.mustache + atoms/images/landscape-16x9.hbs The shorthand include syntax would be: @@ -35,11 +35,11 @@ The pattern type matches the top-level folder and is `atoms`. The pattern name m The following are examples of using the shorthand include syntax with our supported PatternEngines: ``` -{% raw %}{{> atoms-landscape-16x9 }} // Mustache{% endraw %} +{% raw %}{{> atoms-landscape-16x9 }} // Handlebars{% endraw %} {% raw %}{% include "atoms-landscape-16x9" %} // Twig{% endraw %} ``` -The shorthand syntax also allows for fuzzy matching on pattern names. This means that if you feel your pattern name is going to be unique within a given pattern type you can supply just the unique part of the pattern name and the partial will be included correctly. For example, using the shorthand syntax the pattern `atoms-landscape-16x9.mustache` could be written as: +The shorthand syntax also allows for fuzzy matching on pattern names. This means that if you feel your pattern name is going to be unique within a given pattern type you can supply just the unique part of the pattern name and the partial will be included correctly. For example, using the shorthand syntax the pattern `atoms-landscape-16x9.hbs` could be written as: atoms-16x9 @@ -50,11 +50,11 @@ _Warning:_ Because subgroups are not included in the shorthand include syntax a ## The Default Include Syntax -If you need more specificity when including patterns the Node version of Pattern Lab also support the include syntax for the template language that you're using. For example, the syntax for Mustache is the path to the pattern minus the `.mustache` extension. Let's say we wanted to include the following pattern in a molecule: +If you need more specificity when including patterns the Node version of Pattern Lab also support the include syntax for the template language that you're using. For example, the syntax for Handlebars is the path to the pattern minus the `.hbs` extension. Let's say we wanted to include the following pattern in a molecule: - atoms/images/landscape-16x9.mustache + atoms/images/landscape-16x9.hbs -The default Mustache include syntax would be: +The default Handlebars include syntax would be: ```handlebars {% raw %}{{> atoms/images/landscape-16x9 }}{% endraw %} @@ -68,13 +68,13 @@ Here are some examples of how to include patterns as well as some gotchas. ```handlebars {% raw %}// partials to match -atoms/global/test.mustache -atoms/global/test-with-picture.mustache +atoms/global/test.hbs +atoms/global/test-with-picture.hbs // using the shorthand partials syntax -{{> atoms-test }} // will match atoms/global/test.mustache -{{> atoms-test-with-picture }} // will match atoms/global/test-with-picture.mustache +{{> atoms-test }} // will match atoms/global/test.hbs +{{> atoms-test-with-picture }} // will match atoms/global/test-with-picture.hbs -// using the default mustache partials syntax -{{> atoms/global/test }} // will match atoms/global/test.mustache{% endraw %} +// using the default handlebars partials syntax +{{> atoms/global/test }} // will match atoms/global/test.hbs{% endraw %} ``` diff --git a/packages/docs/src/docs/pattern-managing-assets.md b/packages/docs/src/docs/pattern-managing-assets.md index 6771ef0b6..fce4b7c6a 100644 --- a/packages/docs/src/docs/pattern-managing-assets.md +++ b/packages/docs/src/docs/pattern-managing-assets.md @@ -24,28 +24,34 @@ Pattern Lab has a configuration object which allows users to separate source pat ```javascript "paths" : { "source" : { - "root": "./source/", - "patterns" : "./source/_patterns/", - "data" : "./source/_data/", - "meta": "./source/_meta/", - "annotations" : "./source/_annotations/", - "styleguide" : "./node_modules/styleguidekit-assets-default/dist/", - "patternlabFiles" : "./node_modules/styleguidekit-mustache-default/views/", - "js" : "./source/js", - "images" : "./source/images", - "fonts" : "./source/fonts", - "css" : "./source/css/" + "root": "source/", + "patterns" : "source/_patterns/", + "data" : "source/_data/", + "meta": "source/_meta/", + "annotations" : "source/_annotations/", + "styleguide" : "dist/", + "patternlabFiles": { + "general-header": "views/partials/general-header.hbs", + "general-footer": "views/partials/general-footer.hbs", + "patternSection": "views/partials/patternSection.hbs", + "patternSectionSubgroup": "views/partials/patternSectionSubgroup.hbs", + "viewall": "views/viewall.hbs" + }, + "js" : "source/js", + "images" : "source/images", + "fonts" : "source/fonts", + "css" : "source/css/" }, "public" : { - "root" : "./public/", - "patterns" : "./public/patterns/", - "data" : "./public/styleguide/data/", - "annotations" : "./public/annotations/", - "styleguide" : "./public/styleguide/", - "js" : "./public/js", - "images" : "./public/images", - "fonts" : "./public/fonts", - "css" : "./public/css" + "root" : "public/", + "patterns" : "public/patterns/", + "data" : "public/styleguide/data/", + "annotations" : "public/annotations/", + "styleguide" : "public/styleguide/", + "js" : "public/js", + "images" : "public/images", + "fonts" : "public/fonts", + "css" : "public/css" } } ``` diff --git a/packages/docs/src/docs/pattern-organization.md b/packages/docs/src/docs/pattern-organization.md index 9119fac98..b6e8df5ca 100644 --- a/packages/docs/src/docs/pattern-organization.md +++ b/packages/docs/src/docs/pattern-organization.md @@ -24,9 +24,9 @@ Here are the parts: - `patternGroup` denotes the overall pattern type. If using Atomic Design this will be something like "atoms" or "molecules" but it can be anything you want. For example, "components" or "elements." - `patternSubgroup` denotes the sub-type of pattern and is _optional_. This helps to organize patterns under an overall pattern type in the drop downs in Pattern Lab. For example, a "blocks" pattern subgroup under the "molecules" pattern type. - `patternName` is the name of the pattern. This is used when the pattern is displayed in the drop downs in Pattern Lab. -- `patternExtension` is the file extension that tells the PatternEngine to render the pattern. For example, `.mustache`. +- `patternExtension` is the file extension that tells the PatternEngine to render the pattern. For example, `.hbs`. -Dashes (`-`) in your pattern types, pattern subgroups or pattern names will be replaced with spaces. For example, if you want a pattern to be displayed in the drop-down as "Hamburger Navigation" and you're using the Mustache PatternEngine you should name it `hamburger-navigation.mustache`. +Dashes (`-`) in your pattern types, pattern subgroups or pattern names will be replaced with spaces. For example, if you want a pattern to be displayed in the drop-down as "Hamburger Navigation" and you're using the Handlebars PatternEngine you should name it `hamburger-navigation.hbs`. ## Pattern Type Naming Conventions @@ -43,8 +43,8 @@ Node versions support nesting of folders under `patternSubgroup`. For example, y - molecules/ - blocks/ - media-block/ + - media-block.hbs - media-block.md - - media-block.mustache - media-block.scss - media-block~variant1.json - media-block~variant2.json diff --git a/packages/docs/src/docs/pattern-parameters.md b/packages/docs/src/docs/pattern-parameters.md index 5b040e926..65b4ca684 100644 --- a/packages/docs/src/docs/pattern-parameters.md +++ b/packages/docs/src/docs/pattern-parameters.md @@ -11,6 +11,8 @@ sitemapPriority: '0.8' sitemapChangefreq: 'monthly' --- +## Mustache + **Important:** Pattern parameters are supported by the Node Mustache PatternEngines. Other template languages provide better solutions to this problem. Pattern parameters are a **simple** mechanism for replacing Mustache variables in an included pattern. They are limited to replacing variables in the included pattern and **only** the included pattern. They are especially useful when including a single pattern multiple times in a molecule, template, or page and you want to supply unique data to that pattern each time it's included. Pattern parameters **do not** currently support the following: @@ -25,7 +27,7 @@ Pattern parameters are Pattern Lab-specific, have no relationship to Mustache, a - [Adding Pattern Parameters to Your Pattern Partial](#adding-pattern-parameters) - [Toggling Sections with Pattern Parameters](#toggling-sections) -## The Pattern Parameter Syntax +### The Pattern Parameter Syntax The attributes listed in the pattern parameters need to match Mustache variable names in your pattern. The values listed for each attribute will replace the Mustache variables. For example: @@ -33,7 +35,7 @@ The attributes listed in the pattern parameters need to match Mustache variable Again, pattern parameters are a simple find and replace of Mustache variables with the supplied values. -## Adding Pattern Parameters to Your Pattern Partial +### Adding Pattern Parameters to Your Pattern Partial Let's look at a simple example for how we might use pattern parameters. First we'll set-up a pattern that might be included multiple times. We'll make it a simple "message" pattern with a single Mustache variable of `message`. @@ -73,7 +75,7 @@ Instead we can use pattern parameters to supply unique messages for each instanc Now each pattern would have its very own message. -## Toggling Sections with Pattern Parameters +### Toggling Sections with Pattern Parameters While pattern parameters are not a one-to-one match for Mustache they do offer the ability to toggle sections of content. For example we might have the following in a generic header pattern called `organisms-header`: diff --git a/packages/docs/src/docs/pattern-pseudo-patterns.md b/packages/docs/src/docs/pattern-pseudo-patterns.md index 397cc39bc..9cf7a4dc6 100644 --- a/packages/docs/src/docs/pattern-pseudo-patterns.md +++ b/packages/docs/src/docs/pattern-pseudo-patterns.md @@ -33,13 +33,13 @@ From a navigation and naming perspective `patternName` and `pseudoPatternName` w ## Adding Pseudo-Patterns to Your Project -Adding a pseudo-pattern is as simple as naming it correctly and following the [pattern-specific JSON file](/docs/creating-pattern-specific-values/) instructions for organizing its content. Let's look at a simple example where we want to show an emergency notification on our homepage Mustache template. Our `templates/` directory might look like this: +Adding a pseudo-pattern is as simple as naming it correctly and following the [pattern-specific JSON file](/docs/creating-pattern-specific-values/) instructions for organizing its content. Let's look at a simple example where we want to show an emergency notification on our homepage Handlebars template. Our `templates/` directory might look like this: - article.mustache - blog.mustache - homepage.mustache + article.hbs + blog.hbs + homepage.hbs -Our `homepage.mustache` template might look like this: +Our `homepage.hbs` template might look like this: ```html {% raw %} @@ -51,12 +51,12 @@ Our `homepage.mustache` template might look like this: {% endraw %} ``` -If our `_data.json` file doesn't give a value for `emergency` that section will never show up when `homepage.mustache` is rendered. Obviously we'd need to show _both_ the regular and emergency states of the homepage but we don't want to duplicate the entire `homepage.mustache` template. That would be a maintenance nightmare. So let's add our pseudo-pattern: +If our `_data.json` file doesn't give a value for `emergency` that section will never show up when `homepage.hbs` is rendered. Obviously we'd need to show _both_ the regular and emergency states of the homepage but we don't want to duplicate the entire `homepage.hbs` template. That would be a maintenance nightmare. So let's add our pseudo-pattern: ``` -article.mustache -blog.mustache -homepage.mustache +article.hbs +blog.hbs +homepage.hbs homepage~emergency.json ``` diff --git a/packages/docs/src/docs/pattern-reorganizing.md b/packages/docs/src/docs/pattern-reorganizing.md index 1d2b80242..89469bf65 100644 --- a/packages/docs/src/docs/pattern-reorganizing.md +++ b/packages/docs/src/docs/pattern-reorganizing.md @@ -16,14 +16,14 @@ By default, the Node version of Pattern Lab organizes pattern groups, pattern su For example, we'll look at how we can re-organize patterns. Using alphabetical ordering the `lists` pattern subgroup in `atoms` looks like: ``` -definition.mustache -ordered.mustache -unordered.mustache +definition.hbs +ordered.hbs +unordered.hbs ``` This is also the order they'll show up in the drop-down navigation. Because you rarely need to see the definition list pattern, maybe you want to have it show up last in the navigation. To re-order the patterns add the parameter `order` to the documentation `.md` file of the pattern. If no documentation `.md` file exists, you can create one: -The default value for `order` is `0`. That's why there is no file for `ordered.mustache` required. +The default value for `order` is `0`. That's why there is no file for `ordered.hbs` required. ``` --- @@ -42,9 +42,9 @@ order: 1 Result ``` -ordered.mustache -unordered.mustache -definition.mustache +ordered.hbs +unordered.hbs +definition.hbs ``` ## Re-ordering Pseudo-Patterns @@ -56,8 +56,8 @@ The rules for re-ordering [pseudo-patterns](/docs/using-pseudo-patterns/) are sl - Third: order by `pattern-name` / `variant-name` ``` -- some-other-pattern.mustache -- some-pattern.mustache +- some-other-pattern.hbs +- some-pattern.hbs - some-pattern.yml - some-pattern~variation1.yml - some-pattern~variation2.yml diff --git a/packages/docs/src/docs/pattern-states.md b/packages/docs/src/docs/pattern-states.md index 3198faf91..9dfba49e1 100644 --- a/packages/docs/src/docs/pattern-states.md +++ b/packages/docs/src/docs/pattern-states.md @@ -28,7 +28,7 @@ Any pattern that includes a pattern partial that has a lower pattern state will Giving patterns a state is accomplished by setting the `state` frontmatter key on any pattern's companion `.md` file. Consider this media block pattern: ``` -./source/_patterns/molecules/blocks/media-block.mustache +./source/_patterns/molecules/blocks/media-block.hbs ``` We would create or edit a file in the same location, calling it `media-block.md`: diff --git a/packages/edition-node-gulp/README.md b/packages/edition-node-gulp/README.md index 4769ff0ea..044b6e604 100644 --- a/packages/edition-node-gulp/README.md +++ b/packages/edition-node-gulp/README.md @@ -14,7 +14,7 @@ The Gulp wrapper around [Pattern Lab Node Core](https://github.com/pattern-lab/p This Edition comes with the following components: * `@pattern-lab/core`: [GitHub](https://github.com/pattern-lab/patternlab-node/tree/master/packages/core) | [npm](https://www.npmjs.com/package/@pattern-lab/core) -* `@pattern-lab/engine-mustache`: [GitHub](https://github.com/pattern-lab/patternlab-node/tree/master/packages/engine-mustache) | [npm](https://www.npmjs.com/package/@pattern-lab/engine-mustache) +* `@pattern-lab/engine-handlebars`: [GitHub](https://github.com/pattern-lab/patternlab-node/tree/master/packages/engine-handlebars) | [npm](https://www.npmjs.com/package/@pattern-lab/engine-handlebars) * `@pattern-lab/uikit-workshop`: [GitHub](https://github.com/pattern-lab/patternlab-node/tree/master/packages/uikit-workshop) | [npm](https://www.npmjs.com/package/@pattern-lab/uikit-workshop) ## Prerequisites diff --git a/packages/edition-node-gulp/package.json b/packages/edition-node-gulp/package.json index a37aef1fb..0d460ffd3 100644 --- a/packages/edition-node-gulp/package.json +++ b/packages/edition-node-gulp/package.json @@ -6,7 +6,6 @@ "dependencies": { "@pattern-lab/cli": "^6.0.1", "@pattern-lab/core": "^6.0.1", - "@pattern-lab/engine-mustache": "^6.0.0", "@pattern-lab/uikit-workshop": "^6.0.3", "gulp": "4.0.2", "minimist": "1.2.5" diff --git a/packages/edition-node-gulp/patternlab-config.json b/packages/edition-node-gulp/patternlab-config.json index 7a6e89dd8..9ca54c8f5 100644 --- a/packages/edition-node-gulp/patternlab-config.json +++ b/packages/edition-node-gulp/patternlab-config.json @@ -41,15 +41,15 @@ "styleguide": "dist/", "patternlabFiles": { "general-header": - "views/partials/general-header.mustache", + "views/partials/general-header.hbs", "general-footer": - "views/partials/general-footer.mustache", + "views/partials/general-footer.hbs", "patternSection": - "views/partials/patternSection.mustache", + "views/partials/patternSection.hbs", "patternSectionSubgroup": - "views/partials/patternSectionSubgroup.mustache", + "views/partials/patternSectionSubgroup.hbs", "viewall": - "views/viewall.mustache" + "views/viewall.hbs" }, "js": "./source/js", "images": "./source/images", @@ -68,7 +68,7 @@ "css": "public/css" } }, - "patternExtension": "mustache", + "patternExtension": "hbs", "patternStateCascade": ["inprogress", "inreview", "complete"], "patternExportAll": false, "patternExportDirectory": "pattern_exports", diff --git a/packages/edition-node-gulp/source/_meta/_foot.mustache b/packages/edition-node-gulp/source/_meta/_foot.hbs similarity index 100% rename from packages/edition-node-gulp/source/_meta/_foot.mustache rename to packages/edition-node-gulp/source/_meta/_foot.hbs diff --git a/packages/edition-node-gulp/source/_meta/_head.mustache b/packages/edition-node-gulp/source/_meta/_head.hbs similarity index 100% rename from packages/edition-node-gulp/source/_meta/_head.mustache rename to packages/edition-node-gulp/source/_meta/_head.hbs diff --git a/packages/edition-node/patternlab-config.json b/packages/edition-node/patternlab-config.json index 1296ff103..6381139e3 100644 --- a/packages/edition-node/patternlab-config.json +++ b/packages/edition-node/patternlab-config.json @@ -41,15 +41,15 @@ "styleguide": "dist/", "patternlabFiles": { "general-header": - "views/partials/general-header.mustache", + "views/partials/general-header.hbs", "general-footer": - "views/partials/general-footer.mustache", + "views/partials/general-footer.hbs", "patternSection": - "views/partials/patternSection.mustache", + "views/partials/patternSection.hbs", "patternSectionSubgroup": - "views/partials/patternSectionSubgroup.mustache", + "views/partials/patternSectionSubgroup.hbs", "viewall": - "views/viewall.mustache" + "views/viewall.hbs" }, "js": "./source/js", "images": "./source/images", diff --git a/packages/core/test/files/_meta/_foot.mustache b/packages/edition-node/source/_meta/_foot.hbs similarity index 100% rename from packages/core/test/files/_meta/_foot.mustache rename to packages/edition-node/source/_meta/_foot.hbs diff --git a/packages/edition-node/source/_meta/_head.mustache b/packages/edition-node/source/_meta/_head.hbs similarity index 100% rename from packages/edition-node/source/_meta/_head.mustache rename to packages/edition-node/source/_meta/_head.hbs diff --git a/packages/edition-twig/patternlab-config.json b/packages/edition-twig/patternlab-config.json index 40d5301c4..2362cd638 100644 --- a/packages/edition-twig/patternlab-config.json +++ b/packages/edition-twig/patternlab-config.json @@ -109,11 +109,11 @@ "annotations": "./source/_annotations/", "styleguide": "dist/", "patternlabFiles": { - "general-header": "views/partials/general-header.mustache", - "general-footer": "views/partials/general-footer.mustache", - "patternSection": "views/partials/patternSection.mustache", - "patternSectionSubgroup": "views/partials/patternSectionSubgroup.mustache", - "viewall": "views/viewall.mustache" + "general-header": "views/partials/general-header.hbs", + "general-footer": "views/partials/general-footer.hbs", + "patternSection": "views/partials/patternSection.hbs", + "patternSectionSubgroup": "views/partials/patternSectionSubgroup.hbs", + "viewall": "views/viewall.hbs" }, "js": "./source/js", "images": "./source/images", diff --git a/packages/edition-node/source/_meta/_foot.mustache b/packages/edition-twig/source/_meta/_foot.hbs similarity index 100% rename from packages/edition-node/source/_meta/_foot.mustache rename to packages/edition-twig/source/_meta/_foot.hbs diff --git a/packages/edition-twig/source/_meta/_foot.mustache b/packages/edition-twig/source/_meta/_foot.mustache deleted file mode 100644 index 797d9418d..000000000 --- a/packages/edition-twig/source/_meta/_foot.mustache +++ /dev/null @@ -1,6 +0,0 @@ - - -{{{ patternLabFoot }}} - - - diff --git a/packages/edition-twig/source/_meta/_head.mustache b/packages/edition-twig/source/_meta/_head.hbs similarity index 100% rename from packages/edition-twig/source/_meta/_head.mustache rename to packages/edition-twig/source/_meta/_head.hbs diff --git a/packages/engine-handlebars/lib/engine_handlebars.js b/packages/engine-handlebars/lib/engine_handlebars.js index d182971c1..615e5e710 100644 --- a/packages/engine-handlebars/lib/engine_handlebars.js +++ b/packages/engine-handlebars/lib/engine_handlebars.js @@ -54,10 +54,6 @@ const engine_handlebars = { engineName: 'handlebars', engineFileExtension: ['.hbs', '.handlebars'], - // partial expansion is only necessary for Mustache templates that have - // style modifiers or pattern parameters (I think) - expandPartials: false, - // render it renderPattern: function renderPattern(pattern, data, partials) { if (partials) { diff --git a/packages/engine-liquid/lib/engine_liquid.js b/packages/engine-liquid/lib/engine_liquid.js index b5e5dd56b..13615ff51 100644 --- a/packages/engine-liquid/lib/engine_liquid.js +++ b/packages/engine-liquid/lib/engine_liquid.js @@ -38,10 +38,6 @@ module.exports = { engineFileExtension: ['.liquid', '.html'], isAsync: true, - // // partial expansion is only necessary for Mustache templates that have - // // style modifiers or pattern parameters (I think) - // expandPartials: true, - // regexes, stored here so they're only compiled once findPartialsRE: utils.partialsRE, findPartialsWithStyleModifiersRE: utils.partialsWithStyleModifiersRE, diff --git a/packages/engine-mustache/lib/engine_mustache.js b/packages/engine-mustache/lib/engine_mustache.js index e39359490..4698f491b 100644 --- a/packages/engine-mustache/lib/engine_mustache.js +++ b/packages/engine-mustache/lib/engine_mustache.js @@ -104,8 +104,8 @@ const engine_mustache = { * assume it's already present */ spawnMeta: function (config) { - this.spawnFile(config, '_head.mustache'); - this.spawnFile(config, '_foot.mustache'); + this.spawnFile(config, '_head.hbs'); + this.spawnFile(config, '_foot.hbs'); }, // find and return any {{> template-name }} within pattern diff --git a/packages/engine-nunjucks/lib/engine_nunjucks.js b/packages/engine-nunjucks/lib/engine_nunjucks.js index 939e21adc..cb43977f3 100644 --- a/packages/engine-nunjucks/lib/engine_nunjucks.js +++ b/packages/engine-nunjucks/lib/engine_nunjucks.js @@ -33,9 +33,6 @@ const engine_nunjucks = { engineName: 'nunjucks', engineFileExtension: '.njk', - //Important! Must be false for Nunjucks' block inheritance to work. Otherwise Nunjucks sees them as being defined more than once. - expandPartials: false, - // regexes, stored here so they're only compiled once findPartialsRE: /{%\s*(?:extends|include|import|from)\s+(?:'[^']+'|"[^"]+").*%}/g, diff --git a/packages/engine-react/lib/engine_react.js b/packages/engine-react/lib/engine_react.js index a27f0c432..c0ac7f889 100644 --- a/packages/engine-react/lib/engine_react.js +++ b/packages/engine-react/lib/engine_react.js @@ -87,9 +87,6 @@ var engine_react = { engineName: 'react', engineFileExtension: ['.jsx', '.js'], - // hell no - expandPartials: false, - // regexes, stored here so they're only compiled once findPartialsRE: /import .* from '[^']+'/g, findPartialsWithStyleModifiersRE: null, diff --git a/packages/engine-twig-php/lib/engine_twig_php.js b/packages/engine-twig-php/lib/engine_twig_php.js index 0f728dc6b..7e122c305 100644 --- a/packages/engine-twig-php/lib/engine_twig_php.js +++ b/packages/engine-twig-php/lib/engine_twig_php.js @@ -26,7 +26,6 @@ const engine_twig_php = { engine: TwigRenderer, engineName: 'twig-php', engineFileExtension: '.twig', - expandPartials: false, findPartialsRE: /{[%{]\s*.*?(?:extends|include|embed|from|import|use)\(?\s*['"](.+?)['"][\s\S]*?\)?\s*[%}]}/g, namespaces: [], diff --git a/packages/engine-underscore/lib/engine_underscore.js b/packages/engine-underscore/lib/engine_underscore.js index 86b34c307..f0b4dfb59 100644 --- a/packages/engine-underscore/lib/engine_underscore.js +++ b/packages/engine-underscore/lib/engine_underscore.js @@ -92,10 +92,6 @@ const engine_underscore = { engineName: 'underscore', engineFileExtension: ['.html', '.underscore'], - // partial expansion is only necessary for Mustache templates that have - // style modifiers or pattern parameters (I think) - expandPartials: false, - // regexes, stored here so they're only compiled once findPartialsRE: /<%=\s*_\.renderNamedPartial[ \t]*\(\s*("(?:[^"].*?)"|'(?:[^'].*?)').*?%>/g, // TODO diff --git a/packages/plugin-tab/README.md b/packages/plugin-tab/README.md index 359f77fbe..203cf7a18 100644 --- a/packages/plugin-tab/README.md +++ b/packages/plugin-tab/README.md @@ -48,7 +48,7 @@ For example, if we added an `scss` tab: ``` ./_patterns/foo/bar -├── pattern.mustache (the pattern template) +├── pattern.hbs (the pattern template) ├── pattern.md (optional pattern-specific documentation and metadata) ├── pattern.json (optional pattern-specific data) └── pattern.scss (a file matching the tab you added.) diff --git a/packages/starterkit-twig-demo/README.md b/packages/starterkit-twig-demo/README.md index d2b215dd8..22507fabc 100755 --- a/packages/starterkit-twig-demo/README.md +++ b/packages/starterkit-twig-demo/README.md @@ -3,7 +3,7 @@ # Demo StarterKit for Twig -The Demo StarterKit for Twig is meant to be used as a demo that highlights how to combine Twig and Pattern Lab. It is currently very thin. We're looking for maintainers who may be interested in making this demo the equal to if not better than the Mustache demo. +The Demo StarterKit for Twig is meant to be used as a demo that highlights how to combine Twig and Pattern Lab. It is currently very thin. We're looking for maintainers who may be interested in making this demo the equal to if not better than the Handlebars demo. ## Requirements diff --git a/packages/uikit-workshop/package.json b/packages/uikit-workshop/package.json index 70b092874..288f2abfc 100644 --- a/packages/uikit-workshop/package.json +++ b/packages/uikit-workshop/package.json @@ -44,7 +44,6 @@ "@babel/runtime": "^7.13.10", "@pattern-lab/core": "^6.0.1", "@pattern-lab/engine-handlebars": "^6.0.0", - "@pattern-lab/engine-mustache": "^6.0.0", "@pattern-lab/uikit-polyfills": "^6.0.0", "@reach/visually-hidden": "^0.1.2", "@webcomponents/custom-elements": "^1.4.3", diff --git a/packages/uikit-workshop/src/scripts/components/plugin-loader.js b/packages/uikit-workshop/src/scripts/components/plugin-loader.js index 7a7cc5c64..1673d148a 100644 --- a/packages/uikit-workshop/src/scripts/components/plugin-loader.js +++ b/packages/uikit-workshop/src/scripts/components/plugin-loader.js @@ -19,7 +19,7 @@ export const pluginLoader = { const l = t.length - 1; const s = t[l]; const n = document.createElement('script'); - n.type = 'text/mustache'; + n.type = 'text/x-handlebars-template'; n.id = plugin.name.replace('/', '-') + '-' + key + '-template'; n.innerHTML = plugin.templates[key]; s.parentNode.insertBefore(n, s.nextSibling); diff --git a/packages/uikit-workshop/views/partials/general-footer.mustache b/packages/uikit-workshop/views/partials/general-footer.hbs similarity index 100% rename from packages/uikit-workshop/views/partials/general-footer.mustache rename to packages/uikit-workshop/views/partials/general-footer.hbs diff --git a/packages/uikit-workshop/views/partials/general-header.mustache b/packages/uikit-workshop/views/partials/general-header.hbs similarity index 100% rename from packages/uikit-workshop/views/partials/general-header.mustache rename to packages/uikit-workshop/views/partials/general-header.hbs diff --git a/packages/uikit-workshop/views/partials/patternSection.mustache b/packages/uikit-workshop/views/partials/patternSection.hbs similarity index 100% rename from packages/uikit-workshop/views/partials/patternSection.mustache rename to packages/uikit-workshop/views/partials/patternSection.hbs diff --git a/packages/uikit-workshop/views/partials/patternSectionSubgroup.mustache b/packages/uikit-workshop/views/partials/patternSectionSubgroup.hbs similarity index 100% rename from packages/uikit-workshop/views/partials/patternSectionSubgroup.mustache rename to packages/uikit-workshop/views/partials/patternSectionSubgroup.hbs diff --git a/packages/uikit-workshop/views/viewall.mustache b/packages/uikit-workshop/views/viewall.hbs similarity index 100% rename from packages/uikit-workshop/views/viewall.mustache rename to packages/uikit-workshop/views/viewall.hbs