File tree 1 file changed +13
-11
lines changed
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -236,18 +236,20 @@ export async function activate(context: vscode.ExtensionContext) {
236
236
'decentraland/js-sdk-toolchain'
237
237
)
238
238
239
- // Add main.crdt if not present
240
- const mainCrdtPath = path . join ( getCwd ( ) , 'main.crdt' )
241
- const mainCrdtExists = await exists ( mainCrdtPath )
239
+ // Add main.crdt if not present (only if it is a DCL project)
240
+ if ( isDCL ( ) ) {
241
+ const mainCrdtPath = path . join ( getCwd ( ) , 'main.crdt' )
242
+ const mainCrdtExists = await exists ( mainCrdtPath )
242
243
243
- if ( ! mainCrdtExists ) {
244
- log (
245
- `Could not find the main.crdt file, copying from extension path to workspace path: ${ mainCrdtPath } `
246
- )
247
- await vscode . workspace . fs . copy (
248
- vscode . Uri . joinPath ( context . extensionUri , 'resources' , 'main.crdt' ) ,
249
- vscode . Uri . file ( mainCrdtPath )
250
- )
244
+ if ( ! mainCrdtExists ) {
245
+ log (
246
+ `Could not find the main.crdt file, copying from extension path to workspace path: ${ mainCrdtPath } `
247
+ )
248
+ await vscode . workspace . fs . copy (
249
+ vscode . Uri . joinPath ( context . extensionUri , 'resources' , 'main.crdt' ) ,
250
+ vscode . Uri . file ( mainCrdtPath )
251
+ )
252
+ }
251
253
}
252
254
253
255
// Start servers and watchers
You can’t perform that action at this time.
0 commit comments