This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-01-15
Channels
- # adventofcode (6)
- # beginners (63)
- # boot (39)
- # cider (25)
- # clara (9)
- # cljs-dev (27)
- # clojure (100)
- # clojure-dev (39)
- # clojure-dusseldorf (7)
- # clojure-italy (32)
- # clojure-russia (23)
- # clojure-spec (28)
- # clojure-uk (51)
- # clojurescript (197)
- # core-async (44)
- # cursive (3)
- # datomic (14)
- # emacs (4)
- # fulcro (27)
- # graphql (23)
- # hoplon (4)
- # jobs (9)
- # juxt (1)
- # leiningen (3)
- # nyc (1)
- # off-topic (6)
- # om (7)
- # onyx (6)
- # parinfer (11)
- # re-frame (23)
- # reagent (15)
- # ring-swagger (1)
- # rum (15)
- # shadow-cljs (37)
- # sql (24)
- # uncomplicate (4)
- # unrepl (17)
I'd suggest using clj-repl
and invoking the function via the REPL while developing it
while i am developing, i’d be using a repl (probably evaluating the stuff from my editor)
but sometimes i might have a process running in the background from coding, and i want to build a release from the command line using the latest state of the code
i have a release command in package.json so that other team members only need to remember one thing (eg. npm run release
) and this is what our ci / build systems call
I feel like you'd just add --reload
permanently then though and just let it always reload?
the intent would be that anyone else touching the system wouldn’t have to worry about npm run release
not using the latest version of that code
I don't think clojure records when something was loaded. otherwise I could probably do something automatic
by way of example, say i have a dev-server running in the background. i run shadow-cljs watch browser
and do some front-end coding, with live reload. Then I close the watch process and want to run a release
normally i’d just run this from the command line, npm run release
, but since the dev-server is in the background i end up restarting it whenever i do releases. possibly because i just haven’t developed the habit of using a repl for that bit
is there any difference at all between shadow-cljs watch browser
vs. shadow-cljs clj-run my-build-ns.core/watch
, wherein I do some cleanup and then run (shadow.cljs.devtools.api/watch <build-id>)
?
(where ‘cleanup’ means ’revert some asset-path transformations performed during release` and other such build-pipeline-related stuff)
I'm still sorting out the hook API that would let you hook into :watch-start
:release
etc events
so in the meantime, shadow-cljs clj-run my.build.ns/before-watch; shadow-cljs watch browser;
which, if a server is already running, is super fast, otherwise it starts a server process twice