File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
packages/react-devtools-extensions/src/__tests__ Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 1
1
const { transformSync} = require ( '@babel/core' ) ;
2
2
const { btoa} = require ( 'base64' ) ;
3
- const { mkdirSync, readFileSync, writeFileSync} = require ( 'fs' ) ;
3
+ const {
4
+ lstatSync,
5
+ mkdirSync,
6
+ readdirSync,
7
+ readFileSync,
8
+ writeFileSync,
9
+ } = require ( 'fs' ) ;
4
10
const { emptyDirSync} = require ( 'fs-extra' ) ;
5
11
const { resolve} = require ( 'path' ) ;
6
12
@@ -57,4 +63,11 @@ function compile(fileName) {
57
63
) ;
58
64
}
59
65
60
- compile ( 'SimpleComponent.js' ) ;
66
+ // Compile all files in the current directory
67
+ const entries = readdirSync ( sourceDir ) ;
68
+ entries . forEach ( entry => {
69
+ const stat = lstatSync ( resolve ( sourceDir , entry ) ) ;
70
+ if ( ! stat . isDirectory ( ) && entry . endsWith ( '.js' ) ) {
71
+ compile ( entry ) ;
72
+ }
73
+ } ) ;
You can’t perform that action at this time.
0 commit comments