File tree Expand file tree Collapse file tree 3 files changed +7638
-2537
lines changed Expand file tree Collapse file tree 3 files changed +7638
-2537
lines changed Original file line number Diff line number Diff line change 53
53
"@babel/core" : " ^7.26.0" ,
54
54
"@babel/parser" : " ^7.22.6" ,
55
55
"@babel/plugin-transform-typescript" : " ^7.22.5" ,
56
+ "@rnr/starter-base" : " workspace:*" ,
56
57
"chalk" : " 5.2.0" ,
57
58
"commander" : " ^10.0.0" ,
58
59
"cosmiconfig" : " ^8.1.3" ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { fileURLToPath } from 'url';
11
11
import chalk from 'chalk' ;
12
12
import prompts from 'prompts' ;
13
13
import glob from 'fast-glob' ;
14
+ import { createRequire } from 'module' ;
14
15
15
16
const filePath = fileURLToPath ( import . meta. url ) ;
16
17
const fileDir = path . dirname ( filePath ) ;
@@ -196,7 +197,9 @@ export const init = new Command()
196
197
}
197
198
198
199
const spinner = ora ( `Initializing project...` ) . start ( ) ;
199
- const templatesDir = path . join ( fileDir , '../../../packages/templates/starter-base' ) ;
200
+ const templatesDir = path . dirname (
201
+ createRequire ( import . meta. url ) . resolve ( '@rnr/starter-base/package.json' )
202
+ ) ;
200
203
201
204
await installDependencies ( cwd , spinner ) ;
202
205
await updateTsConfig ( cwd , spinner ) ;
You can’t perform that action at this time.
0 commit comments