Skip to content

Commit

Permalink
v1.0.0 - New extension id Posit.shiny (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie authored May 29, 2024
1 parent 3581341 commit 79c821c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "shiny-python",
"name": "shiny",
"displayName": "Shiny",
"description": "Run and develop Shiny apps in Python or R.",
"version": "0.2.1-dev",
"version": "1.0.0",
"publisher": "Posit",
"icon": "logo.png",
"repository": {
Expand Down Expand Up @@ -238,4 +238,4 @@
"lz-string": "^1.5.0",
"winreg": "^1.2.5"
}
}
}
2 changes: 1 addition & 1 deletion src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ function getActiveEditorFile(): string | undefined {

function getExtensionPath(): string | undefined {
const extensionPath =
vscode.extensions.getExtension("Posit.shiny-python")?.extensionPath;
vscode.extensions.getExtension("Posit.shiny")?.extensionPath;
if (!extensionPath) {
vscode.window.showErrorMessage(
"Cannot run Shiny app: failed to locate extension directory"
Expand Down
10 changes: 4 additions & 6 deletions src/shinylive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export async function shinyliveSaveAppFromUrl(): Promise<void> {

const doc = await vscode.workspace.openTextDocument(localFiles[0]);

await vscode.window.showTextDocument(doc, 2, false);
await vscode.window.showTextDocument(doc, undefined, false);
}

function filesAreNotSingleDir(files: ShinyliveFile[]): boolean {
Expand Down Expand Up @@ -542,12 +542,10 @@ function shinyliveUrlDecode(url: string): ShinyliveBundle | undefined {
});

const pathParts = pathname.split("/");
const language: ShinyliveLanguage = pathParts.includes("py") ? "py" : "r";
const mode: ShinyliveMode = pathParts.includes("editor") ? "editor" : "app";

return {
language: pathParts[1] as ShinyliveLanguage,
files: files as ShinyliveFile[],
mode: pathParts[2] as ShinyliveMode,
};
return { language, mode, files: files as ShinyliveFile[] };
}

/**
Expand Down

0 comments on commit 79c821c

Please sign in to comment.