Skip to content

Commit

Permalink
Merge pull request #21 from factorial-io/eleventy-utils-dependency
Browse files Browse the repository at this point in the history
Eleventy utils dependency
  • Loading branch information
dnnsjrng authored May 23, 2022
2 parents 51b5716 + 265a050 commit 34631cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lib/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/* eslint-disable import/no-dynamic-require */
/* eslint-disable global-require */

const debug = require("debug")("Eleventy:TwigTemplate");
const twig = require("twig");
const { TemplatePath } = require("@11ty/eleventy-utils");

Expand All @@ -26,7 +25,8 @@ const registerShortcodes = (shortcodes) => {
try {
twig.extendFunction(shortcode.symbol, shortcode.callback);
} catch (error) {
debug(error);
// eslint-disable-next-line no-console
console.error(error);
}
});
};
Expand All @@ -39,8 +39,6 @@ const registerShortcodes = (shortcodes) => {
* @param {TWIG_OPTIONS} twigOptions
*/
module.exports = (eleventyConfig, twigOptions = {}) => {
debug(eleventyConfig, twigOptions);

if (Array.isArray(twigOptions.shortcodes)) {
registerShortcodes(twigOptions.shortcodes);
}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
"url": "https://github.com/factorial-io/eleventy-plugin-twig/issues"
},
"homepage": "https://github.com/factorial-io/eleventy-plugin-twig#readme",
"dependencies": {
"@11ty/eleventy-utils": "^1.0.1"
},
"devDependencies": {
"@11ty/eleventy-utils": "^1.0.1",
"debug": "^4.3.4",
"eslint": "^8.14.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^8.4.0",
Expand Down

0 comments on commit 34631cd

Please sign in to comment.