Skip to content

Commit cfe69a6

Browse files
committed
Add notes about renaming the extension
1 parent 5454e98 commit cfe69a6

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,27 @@ The tools you need to get started are:
2626
- [Java](https://jdk.java.net/23/)
2727
- [Clojure CLI](https://clojure.org/guides/install_clojure)
2828
- [Babashka](https://github.com/babashka/babashka#installation)
29+
- **If you plan to publish your extension**: At least a skim through Microsofts [Publishing extensions](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) guide and one skim through the corresponding [Publishing Extensions](https://github.com/EclipseFdn/open-vsx.org/wiki/Publishing-Extensions) guide for [open-vsx](https://open-vsx.org/).
2930

3031
Add your curiosity and you should be good to go. To just try the template/workflow out, you do not need to know any ClojureScript (or even programming). When you start to try make the extension do something interesting, you will need to know _some_ Clojure/ClojureScript. Learning Clojure will be a fun endeavor, I promise.
3132

3233
## How do I get started?
3334

3435
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.
36+
> **You may want to wait with renaming the extension itself** until you've confirmed that you can compile and start it, and connect the REPL for development. When that's confirmed, renaming the extension is mainly a matter of a global search and replace in the project. Something like so:
37+
> 1. Make a global search (<kbd>cmd/ctrl</kbd>+<kbd>shift</kbd>+<kbd>f</kbd>) for `vsc-et`. Activate case sensitivity and whole-word matching for precision. Study the results, removing the ones you don't think apply (I think it's safe to replace all occurrences). Expand the replace input and study the results list some more before clicking the **Replace All** button.
38+
> 1. Make a global search replace of “Extension Template”, similarly case sensitive and matching whole words.
39+
> 1. The publisher of the extension template is `betterthantomorrow`, which you will need to change if you are to publish your extension to the marketplace. See above under prerequisites for the guides to go through to get your publisher id.
3540
36-
Then the paved path is:
41+
### Starting the extension
42+
43+
... and connecting the ClojureScript REPL.
44+
45+
The paved path is:
3746

3847
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.
3948
* 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))
49+
1. <kbd>F5</kbd> starts the VS Code Development Extension host (because configured to do so in [.vscode/launch.json](.vscode/launch.json))
4150
* This is a VS Code window where your extension under development is installed.
4251
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!**
4352
![VS Code Command Palette, ET hHello command](assets/usage/say-hello.png)
@@ -46,12 +55,16 @@ Then the paved path is:
4655
1. Select the project root **my-extension**
4756
1. Select the project type **shadow-cljs**
4857
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).
58+
* Now you can hack on the extension code and the extension in the development host window will be updated while it is running (a.k.a. interactive programming).
5059

5160
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.)
5261

5362
To be continued...
5463

64+
### Publishing your extension
65+
66+
Possibly carrying out the steps at [create your own organization](https://learn.microsoft.com/azure/devops/organizations/accounts/create-organization)
67+
5568
## Who built this?
5669

5770
My name is Peter Strömberg, a.k.a. [PEZ](https://github.com/PEZ). I love Clojure and VS Code, and I love to build things. I created Calva, an extension for working with Clojure in VS Code. I also co-created Joyride, a scripting environment for VS Code that lets you extend the editor in user space (i.e. without creating an extension). I've also created Paste Replace, and a whole bunch of Joyride scripts, big and small (mostly small).

0 commit comments

Comments
 (0)