Skip to content

Commit

Permalink
204
Browse files Browse the repository at this point in the history
  • Loading branch information
ascoders committed Aug 2, 2021
1 parent 13963fb commit f0ab10a
Show file tree
Hide file tree
Showing 5 changed files with 2,611 additions and 215 deletions.
33 changes: 23 additions & 10 deletions helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,32 @@
* @author 黄子毅
*/

const fs = require('fs')
const fs = require("fs");

const dirs = ['前沿技术', '设计模式', '编译原理', '源码解读', '商业思考', '算法']
const dirs = [
"前沿技术",
"设计模式",
"编译原理",
"源码解读",
"商业思考",
"算法",
];

dirs.forEach(dir => {
dirs.forEach((dir) => {
const readDir = fs.readdirSync(`./${dir}`);

console.log(`### ${dir}\n`)
console.log(`### ${dir}\n`);

readDir.sort((left, right) => left.split('.')[0] - right.split('.')[0]).forEach(dirName=>{
console.log(`- <a href="./${dir}/${dirName}">${dirName.replace('.md', '')}</a>`)
})

console.log('')
})
readDir
.sort((left, right) => left.split(".")[0] - right.split(".")[0])
.forEach((dirName) => {
console.log(
`- <a href="./${dir}/${encodeURI(dirName)}">${dirName.replace(
".md",
""
)}</a>`
);
});

console.log("");
});
Loading

0 comments on commit f0ab10a

Please sign in to comment.