chore(script): 是否序号而非hash去重命名文件
This commit is contained in:
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user