Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Upgrade: update dependencies #680

Merged
merged 5 commits into from
Jan 15, 2020
Merged

Upgrade: update dependencies #680

merged 5 commits into from
Jan 15, 2020

Conversation

kaicataldo
Copy link
Member

@kaicataldo kaicataldo commented Jan 8, 2020

Eleventy v0.10 adds an API that allows us to add YAML files as a data source! This release is also supposed to improve build speed.

@eslint-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Jan 8, 2020
@kaicataldo kaicataldo added upgrade This change is related to a dependency upgrade and removed triage An ESLint team member will look at this issue soon labels Jan 8, 2020
Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!


module.exports = function(eleventyConfig) {
addPlugins(eleventyConfig);
addFilters(eleventyConfig);
addTransforms(eleventyConfig);

// Add YAML files as data sources
eleventyConfig.addDataExtension("yml", contents => yaml.safeLoad(contents));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eleventyConfig.addDataExtension("yml", contents => yaml.safeLoad(contents));
eleventyConfig.addDataExtension("yml", yaml.safeLoad);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should leave it as-is for now since this is more explicit and a bit safer against either of these APIs changing.

FWIW, the examples are all written this way: https://www.11ty.dev/docs/data-custom/

@kaicataldo kaicataldo merged commit 908f2c5 into master Jan 15, 2020
@kaicataldo kaicataldo deleted the update-deps branch January 15, 2020 01:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
upgrade This change is related to a dependency upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants