Skip to content

Commit

Permalink
Merge branch 'refactor/updated-lerna-dependency' of https://github.co…
Browse files Browse the repository at this point in the history
…m/mfranzke/patternlab-node into refactor/updated-lerna-dependency
  • Loading branch information
mfranzke committed Dec 1, 2021
2 parents 60a3d64 + 2bb2e4e commit daed48b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 22 deletions.
5 changes: 2 additions & 3 deletions packages/core/src/lib/compose.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,8 @@ module.exports = async function (pattern, patternlab) {
);

// Allows serializing the compile state
patternlab.graph.node(
pattern
).compileState = pattern.compileState = CompileState.CLEAN;
patternlab.graph.node(pattern).compileState =
pattern.compileState = CompileState.CLEAN;
logger.info('Built pattern: ' + pattern.patternPartial);
}
);
Expand Down
9 changes: 5 additions & 4 deletions packages/core/src/lib/expandPartials.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ module.exports = function (currentPattern, patternlab) {
`within ${currentPattern.patternPartial}, replacing extendedTemplate partial ${foundPartial} with ${cleanPartialPattern.patternPartial}'s extendedTemplate`
);

currentPattern.extendedTemplate = currentPattern.extendedTemplate.replace(
foundPartial,
cleanPartialPattern.extendedTemplate
);
currentPattern.extendedTemplate =
currentPattern.extendedTemplate.replace(
foundPartial,
cleanPartialPattern.extendedTemplate
);

// update the extendedTemplate in the partials object in case this
// pattern is consumed later
Expand Down
6 changes: 4 additions & 2 deletions packages/core/src/lib/loadPattern.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ module.exports = function (relPath, patternlab) {
currentPattern.template = fs.readFileSync(templatePath, 'utf8');

//find any stylemodifiers that may be in the current pattern
currentPattern.stylePartials = currentPattern.findPartialsWithStyleModifiers();
currentPattern.stylePartials =
currentPattern.findPartialsWithStyleModifiers();

//find any pattern parameters that may be in the current pattern
currentPattern.parameteredPartials = currentPattern.findPartialsWithPatternParameters();
currentPattern.parameteredPartials =
currentPattern.findPartialsWithPatternParameters();

[
templatePath,
Expand Down
10 changes: 4 additions & 6 deletions packages/core/src/lib/object_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,16 +381,14 @@ Pattern.prototype = {
.map((o, i) => {
if (i === 0) {
// TODO: Remove when prefix gets deprecated
info.patternGroupOrder = Pattern.prototype.setPatternOrderDataForInfo(
o
);
info.patternGroupOrder =
Pattern.prototype.setPatternOrderDataForInfo(o);
}

if (i === 1) {
// TODO: Remove when prefix gets deprecated
info.patternSubgroupOrder = Pattern.prototype.setPatternOrderDataForInfo(
o
);
info.patternSubgroupOrder =
Pattern.prototype.setPatternOrderDataForInfo(o);
}

return o.replace(prefixMatcher, '');
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/lib/pattern_engines.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ const PatternEngines = Object.create({
}

// not a hidden pattern, let's dig deeper
const supportedPatternFileExtensions = PatternEngines.getSupportedFileExtensions();
const supportedPatternFileExtensions =
PatternEngines.getSupportedFileExtensions();
return (
supportedPatternFileExtensions.lastIndexOf(extension) !== -1 ||
PatternEngines.isPseudoPatternJSON(filename)
Expand Down
10 changes: 4 additions & 6 deletions packages/core/src/lib/ui_builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,8 @@ const ui_builder = function () {
] = {};
groupedPatterns.patternGroups[pattern.patternGroup][
pattern.patternSubgroup
][
'viewall-' + pattern.patternGroup + '-' + pattern.patternSubgroup
] = injectDocumentationBlock(pattern, patternlab, true);
]['viewall-' + pattern.patternGroup + '-' + pattern.patternSubgroup] =
injectDocumentationBlock(pattern, patternlab, true);

addToViewAllPaths(patternlab, pattern);
addPatternSubgroupItem(patternlab, pattern, true);
Expand Down Expand Up @@ -588,9 +587,8 @@ const ui_builder = function () {
`Omitting ${patternGroupName}/${patternName} from building a viewall page because its patternSubgroup is specified in styleguideExcludes.`
);
} else {
styleguideGroupedPatterns = styleguideGroupedPatterns.concat(
subgroupPatterns
);
styleguideGroupedPatterns =
styleguideGroupedPatterns.concat(subgroupPatterns);
}

groupedPatterns = groupedPatterns.concat(subgroupPatterns);
Expand Down

0 comments on commit daed48b

Please sign in to comment.