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());
}
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 = {};