@@ -3,6 +3,7 @@ import { copyFileSync, readdirSync, readFileSync, writeFileSync } from 'node:fs'
33import { join } from 'node:path' ;
44
55const oxlintDirPath = join ( import . meta. dirname , '..' ) ,
6+ srcDirPath = join ( oxlintDirPath , 'src-js' ) ,
67 distDirPath = join ( oxlintDirPath , 'dist' ) ,
78 debugDirPath = join ( oxlintDirPath , 'debug' ) ;
89
@@ -22,12 +23,11 @@ execSync('pnpm tsdown', { stdio: 'inherit', cwd: oxlintDirPath });
2223
2324// Copy native `.node` files from `src-js`
2425console . log ( 'Copying `.node` files...' ) ;
25-
26- const srcDirPath = join ( oxlintDirPath , 'src-js' ) ;
2726for ( const filename of readdirSync ( srcDirPath ) ) {
2827 if ( ! filename . endsWith ( '.node' ) ) continue ;
29- copyFileSync ( join ( srcDirPath , filename ) , join ( distDirPath , filename ) ) ;
30- copyFileSync ( join ( srcDirPath , filename ) , join ( debugDirPath , filename ) ) ;
28+ const srcPath = join ( srcDirPath , filename ) ;
29+ copyFileSync ( srcPath , join ( distDirPath , filename ) ) ;
30+ copyFileSync ( srcPath , join ( debugDirPath , filename ) ) ;
3131}
3232
3333console . log ( 'Build complete!' ) ;
0 commit comments