Skip to content

Commit

Permalink
Use json view for jres and refresh file explorer on new generated fil…
Browse files Browse the repository at this point in the history
…es (#82)

* list .blocks and .jres as aliases for html/json

* refresh file explorer after writing new .g.ts/.g.jres
  • Loading branch information
jwunderl authored Feb 22, 2023
1 parent 5ee1bb4 commit 9453558
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,21 @@
}
]
},
"languages": [
{
"id": "json",
"extensions": [
".jres",
".g.jres"
]
},
{
"id": "html",
"extensions": [
".blocks"
]
}
],
"configuration": {
"title": "MakeCode Arcade",
"properties": {
Expand Down
4 changes: 4 additions & 0 deletions src/web/assetEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,10 @@ async function saveFilesAsync(files: {[index: string]: string}) {

await writeFileAsync("./pxt.json", JSON.stringify(parsed, null, 4), "utf8");
await syncJResAsync();

if (didChangeConfig) {
await vscode.commands.executeCommand("workbench.files.action.refreshFilesExplorer");
}
}

/**
Expand Down

0 comments on commit 9453558

Please sign in to comment.