juxt / edge

A Clojure application foundation from JUXT
https://juxt.pro/edge/
MIT License
506 stars 62 forks source link

Add settings for Calva Connect Sequences #110

Closed PEZ closed 5 years ago

PEZ commented 5 years ago

This adds setting for the new way to configure custom CLJS REPLs in Calva.

Two sequences are set up:

  1. Edge backend + frontend
    • This setting includes all Calva needs to know and doesn't prompt the user about anything else.
    • NB: The setting "shouldOpenUrl": true makes Calva automatically start the Edge ClojureScript app in the browser, making the Jack-in fully automatic. If you think this is not a desirable default, let me know and I'll update the PR.
  2. Edge backend only
    • This setting does not include any presets, so Calva will prompt for some more info during jack-in.

The Calva Jack-in menu looks like so with these settings added:

image

The instructions for using Calva for a freshly created Edge ClojureScript app will be like so:

  1. Open the project root directory in VS Code.
  2. Open a project file, e.g. deps.edn.
  3. Jack-in: ctrl+alt+c,ctrl+alt+j.
    • Select Edge backend + frontend.
    • Wait for the project to start and the two REPL Windows to open: CLJ REPL and CLJS REPL.
  4. Hack away.
SevereOverfl0w commented 5 years ago

what is startCode vs connectCode? They seem to overlap? It might be that startCode shouldn't call to cljs-repl?

PEZ commented 5 years ago

Good catch! It was a left-over from the old config.

Hmmm, thinking about it, now the message printed is a bit confusing. It's not Figwheel that is started. What would you say is started when the startCode has evaluated?

SevereOverfl0w commented 5 years ago

The system has started at that point.

PEZ commented 5 years ago

Dropped this ball a bit. But now I have changed the message and this is good to go afaiac.