@@ -4,7 +4,6 @@ const ncp = require('ncp').ncp;
4
4
const changeCase = require ( 'change-case' ) ;
5
5
const shell = require ( 'shelljs' ) ;
6
6
const replaceInFiles = require ( 'replace-in-files' ) ;
7
-
8
7
ncp . limit = 16 ;
9
8
10
9
let destinationPath = "" ;
@@ -44,9 +43,10 @@ const locationSelector = async (path)=>{
44
43
//prompt user to select tech stack and save it to a config file
45
44
const stackTypeSelector = async ( path ) => {
46
45
path = path ? path :__dirname + "/developer-templates" ;
47
- let techStack = ""
46
+ console . log ( "stackTypeSelector" , path ) ;
47
+ console . log ( __dirname )
48
48
try {
49
- return JSON . parse ( fs . readFileSync ( "developer-templates/input .json" ) ) . techStack ;
49
+ return JSON . parse ( fs . readFileSync ( __dirname + "developer-templates/config .json" ) ) . techStack ;
50
50
} catch ( e ) {
51
51
let folderList = getFolderList ( path ) ;
52
52
const response = await prompts ( {
@@ -55,7 +55,7 @@ const stackTypeSelector = async (path)=> {
55
55
message : 'Select your Project stack' ,
56
56
choices : folderList
57
57
} ) ;
58
- fs . writeFile ( "developer-templates/input .json" , JSON . stringify ( response ) , function ( err ) {
58
+ fs . writeFile ( "developer-templates/config .json" , JSON . stringify ( response ) , function ( err ) {
59
59
if ( err ) throw err ;
60
60
console . log ( 'Response was saved to /developer-templates/config.json. Delete this file if you want to change it later.' ) ;
61
61
}
@@ -69,6 +69,7 @@ const templateSelector = async (path)=> {
69
69
const techStack = await stackTypeSelector ( ) ;
70
70
console . log ( "Available templates for " + techStack ) ;
71
71
path = path ? path :__dirname + "/developer-templates/" + techStack ;
72
+ console . log ( "templateSelector" , path )
72
73
let folderList = getFolderList ( path ) ;
73
74
const response = await prompts ( {
74
75
type : 'autocomplete' ,
0 commit comments