Skip to content
This repository was archived by the owner on May 11, 2022. It is now read-only.

Commit ca5ac2f

Browse files
authored
Fusetools2 1176 update registration snippet (#640)
* FUSETOOLS2-1176 updating code snippet * adding note about using URLs Signed-off-by: Brian Fitzpatrick <[email protected]>
1 parent ed55226 commit ca5ac2f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

snippets/snippets.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@
1111
"\t\t\tconst commandId = 'vscode.didact.register';",
1212
"\t\t\tconst tutorialName = `${1:Your First Integration}`; // replace this with the name of your integration to appear in the Didact view",
1313
"\t\t\tconst tutorialPath = path.resolve(context.extensionPath, `${2:./path/to/tutorial.didact.md|adoc}`); // replace this path with the location of your Didact file like ./path/to/tutorial.didact.md or ./path/to/tutorial.didact.adoc",
14-
"\t\t\tconst tutorialUri = vscode.Uri.file(`${tutorialPath\\}`);",
14+
"\t\t\tconst tutorialUri = vscode.Uri.file(context.asAbsolutePath(`${tutorialPath\\}`));",
15+
"\t\t\t// or pass an actual https/file uri to use instead",
16+
"\t\t\t// const tutorialURL = 'https://my.domain.for.a.didact.file.org/path/to/tutorial.didact.md|adoc'; // replace this with the https/file uri for your tutorial",
17+
"\t\t\t// const tutorialUri = vscode.Uri.parse(`${tutorialURL\\}`);",
1518
"\t\t\tconst tutorialCategory = `${3:Your Tutorial Category}`; // replace this with the name of the category for your tutorial",
1619
"",
17-
"\t\t\t// then pass name, uri, and category",
20+
"\t\t\t// then pass name, generated uri, and category",
1821
"\t\t\tawait vscode.commands.executeCommand(",
1922
"\t\t\t\tcommandId,",
2023
"\t\t\t\ttutorialName, ",
21-
"\t\t\t\ttutorialUri,",
24+
"\t\t\t\ttutorialUri.fsPath,",
2225
"\t\t\t\ttutorialCategory);",
2326
"\t\t}",
2427
"\t} catch (error) {",

0 commit comments

Comments
 (0)