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:
'',
@@ -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
```
-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
@@ -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