From d2b0a34e699816c01d173fd724d30fbc861c0a1c Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Thu, 17 Nov 2022 16:01:18 +0800 Subject: [PATCH] chore: compress search data. #105 #32 --- scripts/index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/index.mjs b/scripts/index.mjs index 79c74f9fe1f..4bed4eda3d9 100644 --- a/scripts/index.mjs +++ b/scripts/index.mjs @@ -42,7 +42,7 @@ export async function createHTML(files = [], num = 0) { const searchData = await fs.readJSON(SEARCH_DATA); data.path = path.relative(OUTOUT, outputHTMLPath); searchData[options.filename] = data; - await fs.writeJSON(SEARCH_DATA, searchData, { spaces: 2 }); + await fs.writeJSON(SEARCH_DATA, searchData); } await fs.writeFile(outputHTMLPath, html); console.log(`♻️ \x1b[32;1m ${path.relative(OUTOUT, outputHTMLPath)} \x1b[0m`);