Skip to content

Commit

Permalink
A few more tweaks to the success message for 11ty/eleventy#3124
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Jul 23, 2024
1 parent 519cac3 commit bc30a10
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/plugin-land.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = function(eleventyConfig) {
// any of these files in your project

let allRemovedKeys = "pug,ejs,haml,mustache,handlebars".split(",");
let notFound = [];

for(let removedKey of allRemovedKeys) {
let foundFiles = fastglob.sync(`${eleventyConfig.directories.input}**/*.${removedKey}`);
Expand All @@ -22,6 +23,12 @@ module.exports = function(eleventyConfig) {
} else {
console.log(chalk.green(`[${pkg.name}] PASSED`), `You have installed the ${removedKey} plugin to handle the ${foundFiles.length} ${removedKey} file${foundFiles.length !== 1 ? "s" : ""} in your project. Learn more: https://github.com/11ty/eleventy/issues/3124`);
}
} else {
notFound.push(removedKey);
}
}

if(notFound.length > 0) {
console.log(chalk.green(`[${pkg.name}] PASSED`), `No {${notFound.join(",")}} templates were found in this project. If you were, you would have needed to install plugins for these: https://github.com/11ty/eleventy-plugin-template-languages. Learn more: https://github.com/11ty/eleventy/issues/3124`);
}
};

0 comments on commit bc30a10

Please sign in to comment.