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