Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: updated 11ty dependencies #1383

Merged
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
5 changes: 4 additions & 1 deletion packages/docs/.eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ module.exports = function (config) {
config.addPassthroughCopy('src/js');
config.addPassthroughCopy('src/admin/config.yml');
config.addPassthroughCopy('src/admin/previews.js');
config.addPassthroughCopy('../../node_modules/nunjucks/browser/nunjucks-slim.js');
config.addPassthroughCopy({
'../../node_modules/nunjucks/browser/nunjucks-slim.js':
'node_modules/nunjucks/browser/nunjucks-slim.js',
});

const now = new Date();

Expand Down
8 changes: 4 additions & 4 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"description": "The website for patternlab.io",
"main": "index.js",
"dependencies": {
"@11ty/eleventy": "^0.8.3",
"@11ty/eleventy-plugin-rss": "^1.0.6",
"@11ty/eleventy-plugin-syntaxhighlight": "^2.0.3",
"@11ty/eleventy": "^0.12.1",
"@11ty/eleventy-plugin-rss": "^1.1.2",
"@11ty/eleventy-plugin-syntaxhighlight": "^3.1.3",
"@tbranyen/jsdom": "^13.0.0",
"concurrently": "^4.1.0",
"html-minifier": "^4.0.0",
Expand All @@ -18,7 +18,7 @@
"stalfos": "github:hankchizljaw/stalfos#c8971d22726326cfc04089b2da4d51eeb1ebb0eb"
},
"devDependencies": {
"@11ty/eleventy-navigation": "^0.1.5",
"@11ty/eleventy-navigation": "^0.3.2",
"@erquhart/rollup-plugin-node-builtins": "^2.1.5",
"bl": "^3.0.0",
"chokidar-cli": "^2.1.0",
Expand Down
Loading