@@ -7,23 +7,23 @@ import createContext from '../dist/createContext.js'
77import { ACORN_PARSE_OPTIONS } from '../dist/constants.js'
88import { Chapter } from '../dist/types.js'
99
10- async function recursiveDirCopy ( fromPath , dstPath ) {
10+ async function recursiveDirCopy ( srcPath , dstPath ) {
1111 // Copy and keep only necessary files
12- const files = await fsPromises . readdir ( fromPath )
12+ const files = await fsPromises . readdir ( srcPath )
1313
1414 return Promise . all ( files . map ( async fileName => {
15- const fullFromPath = join ( fromPath , fileName )
16- const fullToPath = join ( dstPath , fileName )
15+ const fullSrcPath = join ( srcPath , fileName )
16+ const fullDstPath = join ( dstPath , fileName )
1717
18- const stats = await fsPromises . stat ( fullFromPath )
18+ const stats = await fsPromises . stat ( fullSrcPath )
1919
2020 if ( stats . isFile ( ) ) {
2121 const extension = extname ( fileName )
2222 if ( extension !== '.js' ) return ;
23- await fsPromises . copyFile ( fullFromPath , fullToPath )
23+ await fsPromises . copyFile ( fullSrcPath , fullDstPath )
2424 } else if ( stats . isDirectory ( ) ) {
25- await fsPromises . mkdir ( fullToPath )
26- await recursiveDirCopy ( fullFromPath , fullToPath )
25+ await fsPromises . mkdir ( fullDstPath )
26+ await recursiveDirCopy ( fullSrcPath , fullDstPath )
2727 }
2828 } ) )
2929}
@@ -35,7 +35,7 @@ async function prepare() {
3535
3636 // Remove unnecessary dependencies
3737 await Promise . all ( [
38- 'finder.js' , 'index.js' , 'scope-refactoring.js' , 'sicp-prepare.js'
38+ 'finder.js' , 'index.js' , 'scope-refactoring.js'
3939 ] . map ( fileName => fsPromises . rm ( `sicp_publish/dist/${ fileName } ` ) ) )
4040}
4141
0 commit comments