11const { execSync } = require ( 'child_process' ) ;
22const fs = require ( 'fs' ) ;
33const gulp = require ( 'gulp' ) ;
4- const shell = require ( 'gulp-shell' ) ;
5- const path = reuqire ( 'path' ) ;
6- const process = reuqire ( 'process' ) ;
4+ const path = require ( 'path' ) ;
5+ const process = require ( 'process' ) ;
76const ts = require ( 'gulp-typescript' ) ;
87
98const tsProject = ts . createProject ( 'tsconfig.json' ) ;
@@ -57,12 +56,12 @@ function compile(cb) {
5756 . on ( 'end' , ( ) => cb ( ) ) ;
5857}
5958
60- function clearDir ( dir ) {
59+ function clearDir ( dirPath ) {
6160 // Get a list of files and subdirectories in the directory
62- const items = fs . readdirSync ( directoryPath ) ;
61+ const items = fs . readdirSync ( dirPath ) ;
6362
6463 for ( const item of items ) {
65- const itemPath = path . join ( directoryPath , item ) ;
64+ const itemPath = path . join ( dirPath , item ) ;
6665
6766 if ( fs . statSync ( itemPath ) . isFile ( ) ) {
6867 fs . unlinkSync ( itemPath ) ;
@@ -72,7 +71,7 @@ function clearDir(dir) {
7271 }
7372
7473 // Finally, remove the empty directory
75- fs . rmdirSync ( directoryPath ) ;
74+ fs . rmdirSync ( dirPath ) ;
7675}
7776
7877function copyFiles ( srcDir , destDir ) {
0 commit comments