From 3aa8d53c114487a12f371a5c0169b5092d47f6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E7=AB=8B=E5=B8=AE?= <3294713004@qq.com> Date: Tue, 30 Sep 2025 08:54:28 +0800 Subject: [PATCH] =?UTF-8?q?chore(script):=20=E6=98=AF=E5=90=A6=E5=BA=8F?= =?UTF-8?q?=E5=8F=B7=E8=80=8C=E9=9D=9Ehash=E5=8E=BB=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/build-examples.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/build-examples.js b/scripts/build-examples.js index 02b2d9a1..a3d3f4e8 100644 --- a/scripts/build-examples.js +++ b/scripts/build-examples.js @@ -23,11 +23,15 @@ if (options.type === 'special') { options.type = path.basename(process.cwd()); } +let targetIndex = 0; + const generateHash = (inputString) => { - const hash = crypto.createHash('sha256'); - hash.update(inputString); - return hash.digest('hex'); -} + // const hash = crypto.createHash('sha256'); + // hash.update(inputString); + // return hash.digest('hex'); + targetIndex += 1; + return String(targetIndex); +}; const getExamples = (dirPath, convertExample = false) => { let examples = {};