File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 2525 - run : yarn run build
2626 - run : yarn run build:create
2727
28- - run : yarn add recursive-readdir-files -w
29-
3028 # examples/base 里面的 ts 转换 成 js版本并存储到 examples/basejs
3129 - run : yarn run build:js
3230 - run : yarn run test
Original file line number Diff line number Diff line change 11/**
22 * 转换 examples/base下除src目录下所有ts文件为js文件
33 * */
4+ import recursiveReaddirFiles from 'recursive-readdir-files' ;
45const path = require ( 'path' ) ;
56const fs = require ( 'fs' ) ;
67const FS = require ( 'fs-extra' ) ;
78const ts = require ( 'typescript' ) ;
89const { transformFileAsync } = require ( '@babel/core' ) ;
9- const recursiveReaddirFiles = require ( 'recursive-readdir-files' ) ;
1010
1111const PWDEntry = path . resolve ( __dirname , '../examples/base/' ) ;
1212const PWDOutPut = path . resolve ( __dirname , '../examples/basejs/' ) ;
1313
1414// 获取文件
1515const getFields = async ( ) => {
16- const dirToFiles = await recursiveReaddirFiles . default ( PWDEntry , {
16+ const dirToFiles = await recursiveReaddirFiles ( PWDEntry , {
1717 exclude :
1818 / ( n o d e _ m o d u l e s | .u i w | b u i l d | d i s t | \. d \. t s | \. ( t e s t | s p e c ) \. ( t s | t s x | j s | j s x ) ) $ / ,
1919 } ) ;
You can’t perform that action at this time.
0 commit comments