From e01a43f01e3ffb25e1ec368e062f81d3f59228f9 Mon Sep 17 00:00:00 2001 From: Cory LaViska Date: Wed, 7 Jun 2023 07:54:05 -0400 Subject: [PATCH] rename vars --- docs/eleventy.config.cjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/eleventy.config.cjs b/docs/eleventy.config.cjs index c07b1710f..1244cb495 100644 --- a/docs/eleventy.config.cjs +++ b/docs/eleventy.config.cjs @@ -150,7 +150,8 @@ module.exports = function (eleventyConfig) { const map = {}; const searchIndexFilename = path.join(eleventyConfig.dir.output, assetsDir, 'search.json'); - const lunrFilename = path.join(eleventyConfig.dir.output, assetsDir, 'scripts/lunr.js'); + const lunrInput = '../node_modules/lunr/lunr.min.js'; + const lunrOutput = path.join(eleventyConfig.dir.output, assetsDir, 'scripts/lunr.js'); const searchIndex = lunr(function () { // The search index uses these field names extensively, so shortening them can save some serious bytes. The // initial index file went from 468 KB => 401 KB by using single-character names! @@ -187,7 +188,7 @@ module.exports = function (eleventyConfig) { }); // Copy the Lunr search client and write the index - fs.copyFileSync('../node_modules/lunr/lunr.min.js', lunrFilename); + fs.copyFileSync(lunrInput, lunrOutput); fs.writeFileSync(searchIndexFilename, JSON.stringify({ searchIndex, map }), 'utf-8'); hasBuiltSearchIndex = true;