@@ -27,7 +27,7 @@ async function writeJson(jsonPath, dependencies) {
2727 toDelDeps . forEach ( ( dep ) => {
2828 delete json . dependencies [ dep ]
2929 } )
30- writeFile ( jsonPath , JSON . stringify ( json , null , 2 ) )
30+ writeFile ( jsonPath , JSON . stringify ( json , null , 2 ) + '\n' )
3131}
3232
3333// 解析文件内容中的opentiny依赖
@@ -55,7 +55,7 @@ async function addComponentDepencies(component, dir) {
5555 const allFiles = await fg ( [ '**/*.ts' , '**/*.vue' ] , {
5656 dot : true ,
5757 cwd : componentPath ,
58- ignore : [ '**/node_modules' , '__test__' ]
58+ ignore : [ '**/node_modules' , '__test__' , '__tests__' ]
5959 } )
6060 for ( let i = 0 ; i < allFiles . length ; i ++ ) {
6161 const file = allFiles [ i ]
@@ -73,6 +73,6 @@ scanDir(root, 'dir').then((dirs) => {
7373 dirs . forEach ( ( dir ) => addComponentDepencies ( dir , root ) )
7474} )
7575
76- scanDir ( path . join ( root , 'chart ' ) , 'dir' ) . then ( ( dirs ) => {
77- dirs . forEach ( ( dir ) => addComponentDepencies ( dir , path . join ( root , 'chart ' ) ) )
76+ scanDir ( path . join ( root , 'huicharts ' ) , 'dir' ) . then ( ( dirs ) => {
77+ dirs . forEach ( ( dir ) => addComponentDepencies ( dir , path . join ( root , 'huicharts ' ) ) )
7878} )
0 commit comments