mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 23:36:11 +02:00
📚 Add missing command to open a repl on frontend process (#6458)
* 📚 Add missing command to open a repl on frontend process * 📚 Add further information on starting a REPL on the frontend process
This commit is contained in:
parent
c2b67d7c67
commit
69cc4fb4c2
1 changed files with 20 additions and 8 deletions
|
@ -78,24 +78,36 @@ connect to penpot by browsing to http://localhost:3449 .
|
||||||
### Frontend
|
### Frontend
|
||||||
|
|
||||||
The frontend build process is located on the tmux **window 0** and
|
The frontend build process is located on the tmux **window 0** and
|
||||||
**window 1**. On the **window 0** we have the gulp process responsible
|
**window 1**. On **window 0** we have the gulp process responsible
|
||||||
of watching and building styles, fonts, icon-spreads and templates.
|
for watching and building styles, fonts, icon-spreads and templates.
|
||||||
|
|
||||||
On the **window 1** we can found the **shadow-cljs** process that is
|
On **window 1** we can find the **shadow-cljs** process that is
|
||||||
responsible on watch and build frontend clojurescript code.
|
responsible for watching and building frontend clojurescript code.
|
||||||
|
|
||||||
Additionally to the watch process you probably want to be able open a REPL
|
In addition to the watch process you probably want to be able to open a REPL
|
||||||
process on the frontend application, for this case you can split the window
|
process on the frontend application. In order to do this you can split the
|
||||||
and execute this:
|
window (`Ctrl+b "`) and execute:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
cd penpot/frontend
|
||||||
npx shadow-cljs cljs-repl main
|
npx shadow-cljs cljs-repl main
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In order to have the REPL working you need to have an active browser session
|
||||||
|
with the penpot application opened (otherwise, you will get the error
|
||||||
|
`No application has connected to the REPL server.`).
|
||||||
|
|
||||||
|
Finally, in case you want to connect to the REPL from your IDE, you can set it
|
||||||
|
up to use nREPL with the port `3447` and the host `localhost` (you can see the
|
||||||
|
port in the startup message of the shadow-cljs process in **window 1**). You
|
||||||
|
will also need to call `(shadow/repl :main)` in the REPL to start the connection,
|
||||||
|
as explained [here](https://shadow-cljs.github.io/docs/UsersGuide.html#_server_options).
|
||||||
|
|
||||||
|
|
||||||
### Storybook
|
### Storybook
|
||||||
|
|
||||||
The storybook local server is started on tmux **window 2** and will listen
|
The storybook local server is started on tmux **window 2** and will listen
|
||||||
for changes in the styles, components or stories defined in the folders
|
for changes in the styles, components or stories defined in the folders
|
||||||
under the design system namespace: `app.main.ui.ds`.
|
under the design system namespace: `app.main.ui.ds`.
|
||||||
|
|
||||||
You can open the broser on http://localhost:6006/ to see it.
|
You can open the broser on http://localhost:6006/ to see it.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue