File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @objectql/create" ,
3- "version" : " 1.0.0 " ,
3+ "version" : " 1.0.1 " ,
44 "description" : " Create ObjectQL apps with one command" ,
55 "bin" : {
66 "create-objectql" : " ./dist/bin.js"
Original file line number Diff line number Diff line change @@ -44,6 +44,32 @@ async function copyTemplates() {
4444 }
4545 console . log ( `Copying ${ task . src } -> ${ task . dest } ` ) ;
4646 await fs . copy ( task . src , task . dest , { filter : filterFunc } ) ;
47+
48+ // Fix tsconfig.json (Remove dependency on monorepo base)
49+ const tsconfigPath = path . join ( task . dest , 'tsconfig.json' ) ;
50+ if ( fs . existsSync ( tsconfigPath ) ) {
51+ const tsconfig = await fs . readJson ( tsconfigPath ) ;
52+ delete tsconfig . extends ;
53+
54+ // Inject standalone compiler options
55+ tsconfig . compilerOptions = {
56+ target : "ES2019" ,
57+ module : "commonjs" ,
58+ declaration : true ,
59+ strict : true ,
60+ esModuleInterop : true ,
61+ skipLibCheck : true ,
62+ forceConsistentCasingInFileNames : true ,
63+ moduleResolution : "node" ,
64+ sourceMap : true ,
65+ outDir : "./dist" ,
66+ rootDir : "./src" ,
67+ resolveJsonModule : true ,
68+ ...tsconfig . compilerOptions // Keep any specific overrides
69+ } ;
70+
71+ await fs . writeJson ( tsconfigPath , tsconfig , { spaces : 2 } ) ;
72+ }
4773 }
4874
4975 console . log ( 'Templates copied successfully.' ) ;
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ program
6969 const pkgPath = path . join ( root , 'package.json' ) ;
7070 if ( fs . existsSync ( pkgPath ) ) {
7171 const pkg = await fs . readJson ( pkgPath ) ;
72+ pkg . name = path . basename ( root ) ;
7273 delete pkg . private ;
7374 delete pkg . repository ;
7475
You can’t perform that action at this time.
0 commit comments