forked from ascoders/weekly
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
220 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* 发布辅助脚本 | ||
* @author 黄子毅 | ||
*/ | ||
|
||
const fs = require('fs') | ||
|
||
const dirs = ['前沿技术', '设计模式', '编译原理', '源码解读', '商业思考'] | ||
|
||
dirs.forEach(dir => { | ||
const readDir = fs.readdirSync(`./${dir}`); | ||
|
||
console.log(`### ${dir}\n`) | ||
|
||
readDir.sort((left, right) => left.split('.')[0] - right.split('.')[0]).forEach(dirName=>{ | ||
console.log(`- <a href="./${dir}/${dirName}" target="_blank">${dirName.replace('.md', '')}</a>`) | ||
}) | ||
|
||
console.log('\n') | ||
}) | ||
|
Oops, something went wrong.