File tree Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Expand file tree Collapse file tree 2 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 42
42
43
43
## 文章
44
44
45
+ 1 . [ 中不中奖,都是抽奖程序的锅?] ( /articles/20191216_liuguanyu_中不中奖,都是抽奖程序的锅?.md ) (20191216 [ @liuguanyu ] ( https://github.com/liuguanyu ) )
45
46
1 . [ 『 Vue 小 Case 』- Vue Prop 中的 null vs undefined] ( /articles/20191128_verymuch_『_Vue_小_Case_』-_Vue_Prop_中的_null_vs_undefined.md ) (20191128 [ @verymuch ] ( https://github.com/verymuch ) )
46
47
1 . [ iOS 13 新增了哪些无障碍功能?] ( /articles/20191118_anjia_iOS_13_新增了哪些无障碍功能?.md ) (20191118 [ @anjia ] ( https://github.com/anjia ) )
47
48
1 . [ 把你的NodeJS程序给没有NodeJS的人运行] ( /articles/20191113_liuguanyu_把你的NodeJS程序给没有NodeJS的人运行.md ) (20191113 [ @liuguanyu ] ( https://github.com/liuguanyu ) )
65
66
1 . [ ES2019新特性你知道哪些] ( /articles/20190826_betseyliu_ES2019新特性你知道哪些.md ) (20190826 [ @betseyliu ] ( https://github.com/betseyliu ) )
66
67
1 . [ css blend mode] ( /articles/20190819_verymuch_css_blend_mode.md ) (20190819 [ @verymuch ] ( https://github.com/verymuch ) )
67
68
1 . [ 【译】移动App的可访问性陷阱和测试方法] ( /articles/20190815_anjia_【译】移动App的可访问性陷阱和测试方法.md ) (20190815 [ @anjia ] ( https://github.com/anjia ) )
68
- 1 . [ 源自babel的多包管理工具:Lerna] ( /articles/20190812_anjia_源自babel的多包管理工具 :Lerna.md ) (20190812 [ @anjia ] ( https://github.com/anjia ) )
69
+ 1 . [ 源自babel的多包管理工具:Lerna] ( /articles/20190812_liuguanyu_源自babel的多包管理工具 :Lerna.md ) (20190812 [ @liuguanyu ] ( https://github.com/liuguanyu ) )
69
70
1 . [ 捕获FMP的原理] ( /articles/20190807_berwin_捕获FMP的原理.md ) (20190807 [ @berwin ] ( https://github.com/Berwin ) )
70
71
1 . [ setTimeout小尴尬的启示] ( /articles/20190805_cncuckoo_setTimeout小尴尬的启示.md ) (20190805 [ @cncuckoo ] ( https://github.com/cncuckoo ) )
71
72
1 . [ CORS为什么要区分『简单请求』和『预检请求』?] ( /articles/20190801_hax_CORS为什么要区分『简单请求』和『预检请求』?.md ) (20190801 [ @hax ] ( https://github.com/hax ) )
184
185
>
185
186
> 谢谢合作!
186
187
187
-
188
+
Original file line number Diff line number Diff line change @@ -98,14 +98,17 @@ function getArticlesInfo(dir) {
98
98
99
99
files . forEach ( file => {
100
100
const execReg = / ^ ( \d { 8 } ) [ - _ ] ( [ ^ _ ] + ) [ - _ ] ( .+ ) (?: .m d ) $ / ;
101
- let [ fileName , date , writer , articleName ] = execReg . exec ( file ) ;
102
- fileName = rename ( articlesDir , fileName ) ;
103
- articlesInfo . push ( {
104
- fileName,
105
- date,
106
- articleName : articleName . replace ( / _ / g, ' ' ) ,
107
- writer : writer . toLowerCase ( ) ,
108
- } ) ;
101
+ const info = execReg . exec ( file ) ;
102
+ if ( info !== null ) {
103
+ let [ fileName , date , writer , articleName ] = execReg . exec ( file ) ;
104
+ fileName = rename ( articlesDir , fileName ) ;
105
+ articlesInfo . push ( {
106
+ fileName,
107
+ date,
108
+ articleName : articleName . replace ( / _ / g, ' ' ) ,
109
+ writer : writer . toLowerCase ( ) ,
110
+ } ) ;
111
+ }
109
112
} )
110
113
111
114
return articlesInfo . sort ( ( a , b ) => b . date - a . date ) ;
@@ -181,4 +184,4 @@ ${copyright}
181
184
fs . writeFile ( './README.md' , spliceInfo ( ) , function ( err ) {
182
185
if ( err ) throw err ;
183
186
console . log ( '更新成功' ) ;
184
- } )
187
+ } )
You can’t perform that action at this time.
0 commit comments