Skip to content

Commit 5454e98

Browse files
committed
Add first get started steps
1 parent 01429f8 commit 5454e98

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,26 @@ Add your curiosity and you should be good to go. To just try the template/workfl
3131

3232
## How do I get started?
3333

34-
TBD...
34+
On Github **Use this template**, and name your repository, say you are full of imagination and name it **my-extension**. Clone your repo and open it in VS Code.
35+
36+
Then the paved path is:
37+
38+
1. <kbd>cmd/ctrl</kbd>+<kbd>shift</kbd>+<kbd>b</kbd>. This starts the default build task, which is configured (in [.vscode/tasks.json](.vscode/tasks.json) to start shadow-cljs watcher.
39+
* Let it compile the extension and run the tests.
40+
1. <kbd>F5</kbd>. Starts the VS Code Development Extension host (because configured to do so in [.vscode/launch.json](.vscode/launch.json))
41+
* This is a VS Code window where your extension under development is installed.
42+
1. In the extension development host <kbd>cmd/ctrl</kbd>+<kbd>shift</kbd>+<kbd>p</kbd>, find and run the command **Extension template: Say hello!**
43+
![VS Code Command Palette, ET hHello command](assets/usage/say-hello.png)
44+
* This activates your extension and starts the ClojureScript REPL
45+
1. Back in the development project run the command **Calva: Connect to a Running REPL Server in the Project**:
46+
1. Select the project root **my-extension**
47+
1. Select the project type **shadow-cljs**
48+
1. Select to connect to the build `:extension`
49+
* Now you can hack on the extension code and the extension in the development host window will be updated while it is running (interactive programming).
50+
51+
The important thing to note here is the steps where you activate your extension in the development host, starting the ClojureScript repl which Calva can connect to. Depending on the extension you build, it may be that it activates automatically, or by some specific file appearing or whatever. The point is that it needs to be started for Calva to connect to it, and it starting the development host is often not enough to start your extension. (You can actually start the Calva connect before you start the extension host. Calva will connect when the repl is started.)
52+
53+
To be continued...
3554

3655
## Who built this?
3756

assets/usage/say-hello.png

73.6 KB
Loading

0 commit comments

Comments
 (0)