@@ -40,7 +40,6 @@ const componentIndex = [];
40
40
const outputIndex = ( index , indexFile ) => {
41
41
const esmIndexString = index . map ( file => `export { ${ file } } from './${ file } ';` ) . join ( '\n' ) ;
42
42
outputFileSync ( join ( outDir , 'esm' , indexFile ) , esmIndexString ) ;
43
- outputFileSync ( join ( outDir , 'js' , indexFile . replace ( '.js' , '.d.ts' ) ) , esmIndexString ) ;
44
43
outputFileSync (
45
44
join ( outDir , 'js' , indexFile ) ,
46
45
`
@@ -52,6 +51,8 @@ exports.__esModule = true;
52
51
${ index . map ( file => `__export(require('./${ file } '));` ) . join ( '\n' ) }
53
52
` . trim ( )
54
53
) ;
54
+ outputFileSync ( join ( outDir , 'esm' , indexFile . replace ( '.js' , '.d.ts' ) ) , esmIndexString ) ;
55
+ outputFileSync ( join ( outDir , 'js' , indexFile . replace ( '.js' , '.d.ts' ) ) , esmIndexString ) ;
55
56
} ;
56
57
57
58
/**
@@ -92,7 +93,7 @@ function writeTokens(tokens) {
92
93
outputIndex ( componentIndex , 'componentIndex.js' ) ;
93
94
94
95
// eslint-disable-next-line no-console
95
- console . log ( 'Wrote' , Object . keys ( allIndex ) . length * 3 + 3 , 'token files' ) ;
96
+ console . log ( 'Wrote' , Object . keys ( allIndex ) . length * 4 + 4 , 'token files' ) ;
96
97
}
97
98
98
99
writeTokens ( generateTokens ( ) ) ;
0 commit comments