File tree Expand file tree Collapse file tree 5 files changed +16
-17
lines changed Expand file tree Collapse file tree 5 files changed +16
-17
lines changed Original file line number Diff line number Diff line change @@ -111,23 +111,14 @@ export function createMemoryEnvironment(returnPathsRelativeTo: string = '') {
111
111
112
112
const { fs, vol } = memfs ( { } )
113
113
114
- const cwd = process . cwd ( )
115
- const isInCwd = ( path : string ) => path . startsWith ( cwd )
116
- const isTemplatePath = ( path : string ) => ! isInCwd ( path )
117
-
118
114
environment . appendFile = async ( path : string , contents : string ) => {
119
115
fs . mkdirSync ( dirname ( path ) , { recursive : true } )
120
116
await fs . appendFileSync ( path , contents )
121
117
}
122
118
environment . copyFile = async ( from : string , to : string ) => {
123
- if ( isTemplatePath ( from ) ) {
124
- const contents = ( await readFile ( from ) ) . toString ( )
125
- fs . mkdirSync ( dirname ( to ) , { recursive : true } )
126
- fs . writeFileSync ( to , contents )
127
- } else {
128
- fs . mkdirSync ( dirname ( to ) , { recursive : true } )
129
- fs . copyFileSync ( from , to )
130
- }
119
+ fs . mkdirSync ( dirname ( to ) , { recursive : true } )
120
+ fs . copyFileSync ( from , to )
121
+ return Promise . resolve ( )
131
122
}
132
123
environment . execute = async ( command : string , args : Array < string > ) => {
133
124
output . commands . push ( {
Original file line number Diff line number Diff line change
1
+ export const TMP_TARGET_DIR = '/__cta-tmp__'
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import {
12
12
writeConfigFileToEnvironment ,
13
13
} from '@tanstack/cta-engine'
14
14
15
+ import { TMP_TARGET_DIR } from '../constants.js'
16
+
15
17
import { cleanUpFileArray , cleanUpFiles } from './file-helpers.js'
16
18
import { getProjectPath } from './server-environment.js'
17
19
import { createAppWrapper } from './create-app-wrapper.js'
@@ -37,7 +39,7 @@ export async function addToAppWrapper(
37
39
}
38
40
39
41
const options = await createAppOptionsFromPersisted ( persistedOptions )
40
- options . targetDir = projectPath
42
+ options . targetDir = opts . dryRun ? TMP_TARGET_DIR : projectPath
41
43
42
44
const newAddons : Array < string > = [ ]
43
45
for ( const addOn of addOns ) {
Original file line number Diff line number Diff line change 9
9
loadStarter ,
10
10
} from '@tanstack/cta-engine'
11
11
12
+ import { TMP_TARGET_DIR } from '../constants.js'
13
+
12
14
import { registerFrameworks } from './framework-registration.js'
13
15
14
16
import { cleanUpFileArray , cleanUpFiles } from './file-helpers.js'
@@ -51,8 +53,9 @@ export async function createAppWrapper(
51
53
)
52
54
53
55
const projectPath = getProjectPath ( )
54
- const targetDir =
55
- getApplicationMode ( ) === 'add'
56
+ const targetDir = opts . dryRun
57
+ ? TMP_TARGET_DIR
58
+ : getApplicationMode ( ) === 'add'
56
59
? projectOptions . targetDir
57
60
: resolve ( projectPath , projectOptions . projectName )
58
61
Original file line number Diff line number Diff line change @@ -22,8 +22,10 @@ body {
22
22
-moz-osx-font-smoothing : grayscale;
23
23
}
24
24
25
- code {
26
- font-size : 12px ;
25
+ code ,
26
+ .cm-theme ,
27
+ .cm-merge-theme {
28
+ font-size : 16px ;
27
29
font-family :
28
30
'JetBrains Mono' ,
29
31
Menlo,
You can’t perform that action at this time.
0 commit comments