chore(script): 是否序号而非hash去重命名文件

This commit is contained in:
王立帮
2025-09-30 08:54:28 +08:00
parent 5651def093
commit 3aa8d53c11

View File

@@ -23,11 +23,15 @@ if (options.type === 'special') {
options.type = path.basename(process.cwd()); options.type = path.basename(process.cwd());
} }
let targetIndex = 0;
const generateHash = (inputString) => { const generateHash = (inputString) => {
const hash = crypto.createHash('sha256'); // const hash = crypto.createHash('sha256');
hash.update(inputString); // hash.update(inputString);
return hash.digest('hex'); // return hash.digest('hex');
} targetIndex += 1;
return String(targetIndex);
};
const getExamples = (dirPath, convertExample = false) => { const getExamples = (dirPath, convertExample = false) => {
let examples = {}; let examples = {};