@@ -140,7 +140,7 @@ async function init() {
140140 needsEslint ? : false | 'eslintOnly' | 'speedUpWithOxlint'
141141 needsOxlint ? : boolean
142142 needsPrettier ? : boolean
143- runtime ? : 'nodejs ' | 'bun'
143+ runtime ? : 'node ' | 'bun'
144144 } = { }
145145
146146 try {
@@ -168,16 +168,16 @@ async function init() {
168168 initial : 0 ,
169169 choices : [
170170 {
171- title : language . needsRuntime . selectOptions . nodejs . title ,
172- description : language . needsRuntime . selectOptions . nodejs . desc ,
173- value : 'nodejs'
171+ title : language . needsRuntime . selectOptions . node . title ,
172+ description : language . needsRuntime . selectOptions . node . desc ,
173+ value : 'node' ,
174174 } ,
175175 {
176176 title : language . needsRuntime . selectOptions . bun . title ,
177177 description : language . needsRuntime . selectOptions . bun . desc ,
178- value : 'bun'
179- }
180- ]
178+ value : 'bun' ,
179+ } ,
180+ ] ,
181181 } ,
182182 {
183183 name : 'projectName' ,
@@ -345,7 +345,7 @@ async function init() {
345345 needsPinia = argv . pinia ,
346346 needsVitest = argv . vitest || argv . tests ,
347347 needsPrettier = argv [ 'eslint-with-prettier' ] ,
348- runtime = 'nodejs ' ,
348+ runtime = 'node ' ,
349349 } = result
350350
351351 const needsEslint = Boolean ( argv . eslint || argv [ 'eslint-with-prettier' ] || result . needsEslint )
@@ -378,8 +378,8 @@ async function init() {
378378 const templateRoot = path . resolve ( __dirname , 'template' )
379379 const callbacks = [ ]
380380 const render = function render ( templateName : string ) {
381- let templateDir = fs . existsSync ( path . resolve ( templateRoot , runtime , templateName ) )
382- if ( ! fs . existsSync ( targetDir ) ) {
381+ let templateDir = path . resolve ( templateRoot , 'others- runtime' , runtime , templateName )
382+ if ( ! fs . existsSync ( templateDir ) ) {
383383 templateDir = path . resolve ( templateRoot , templateName )
384384 }
385385 renderTemplate ( templateDir , root , callbacks )
@@ -428,7 +428,7 @@ async function init() {
428428 // All templates contain at least a `.node` and a `.app` tsconfig.
429429 references : [
430430 {
431- path : ' ./tsconfig.node .json' ,
431+ path : ` ./tsconfig.${ runtime } .json` ,
432432 } ,
433433 {
434434 path : './tsconfig.app.json' ,
@@ -526,7 +526,7 @@ async function init() {
526526 // EJS template rendering
527527 preOrderDirectoryTraverse (
528528 root ,
529- ( ) => { } ,
529+ ( ) => { } ,
530530 ( filepath ) => {
531531 if ( filepath . endsWith ( '.ejs' ) ) {
532532 const template = fs . readFileSync ( filepath , 'utf-8' )
@@ -556,7 +556,7 @@ async function init() {
556556 // `jsconfig.json` is not reused, because we use solution-style `tsconfig`s, which are much more complicated.
557557 preOrderDirectoryTraverse (
558558 root ,
559- ( ) => { } ,
559+ ( ) => { } ,
560560 ( filepath ) => {
561561 if ( filepath . endsWith ( '.js' ) && ! filepath . endsWith ( 'eslint.config.js' ) ) {
562562 const tsFilePath = filepath . replace ( / \. j s $ / , '.ts' )
@@ -579,7 +579,7 @@ async function init() {
579579 // Remove all the remaining `.ts` files
580580 preOrderDirectoryTraverse (
581581 root ,
582- ( ) => { } ,
582+ ( ) => { } ,
583583 ( filepath ) => {
584584 if ( filepath . endsWith ( '.ts' ) ) {
585585 fs . unlinkSync ( filepath )
0 commit comments