@@ -4,7 +4,7 @@ import {fileExists} from '../tools/file';
44
55function createFile ( pathToFile : string ) : void {
66 if ( ! fileExists ( pathToFile ) ) {
7- let inputPath = path . join ( __dirname , '..' , '..' , 'setup' , pathToFile ) ;
7+ let inputPath : string = path . join ( __dirname , '..' , '..' , 'setup' , pathToFile ) ;
88 let test = fs . readFileSync ( inputPath , 'utf8' ) ;
99 fs . writeFileSync ( pathToFile , test , 'utf8' ) ;
1010 }
@@ -30,10 +30,11 @@ export function createTutorialMd(): void {
3030
3131export function createPackageJson ( name : string ) : void {
3232 if ( ! fileExists ( 'package.json' ) ) {
33- let inputPath = path . join ( __dirname , '..' , '..' , 'setup' , 'package.json' ) ;
34- let packageJson = JSON . parse ( fs . readFileSync ( inputPath , 'utf8' ) ) ;
33+ console . log ( __dirname ) ;
34+ let inputPath : string = path . join ( __dirname , '..' , '..' , 'setup' , 'package.json' ) ;
35+ let packageJson : PackageJson = JSON . parse ( fs . readFileSync ( inputPath , 'utf8' ) ) ;
3536 packageJson . name = 'coderoad-' + name ;
36- let packageJsonString = JSON . stringify ( packageJson , null , 2 ) ;
37+ let packageJsonString : string = JSON . stringify ( packageJson , null , 2 ) ;
3738 fs . writeFileSync ( 'package.json' , packageJsonString , 'utf8' ) ;
3839 }
3940}
0 commit comments