Fork me on GitHub
#clojurescript
<
2022-01-10
>
rberger05:01:25

Just published an article on https://dev.to/aws-builders/how-to-use-amplify-studio-figma-connector-with-clojurescript-382d  Amplify Studio is pretty cool. You can do UI design in Figma using AWS Amplify UI Components and import it into your Amplify project. The article focuses on how to use that with Clojurescript. The main issues was I actually had to learn webpack / babel so the JSX ui-components and js graphql model code that gets imported into the project would get properly processed and bundled to be easily required into the Clojurescript.

👍 3
leif17:01:40

Looking at the :bundle-cmd option in ClojureScript the docs say: > The command should be one that exits, i.e. you cannot use this to launch a watcher. (https://clojurescript.org/reference/compiler-options)

leif17:01:52

But how about spawning a background process with a watcher in it, is that allowed?

leif17:01:18

(Or does the clojurescript compiler explicitly call wait for all subprocesses to terminate?)

dnolen18:01:40

@leif I'm pretty sure we just shell out, if the process does not return you will hang the build

leif18:01:33

Right, but can't a shell spawn a process and then detach from it? (Although I'd have to double check my unix-processes references to confirm that.)

leif18:01:49

I guess basically I'm trying to let another process which watches my non-clojurescript files know that the first build of clojurescript is done, so it can begin watching.

leif18:01:03

(Currently using figwheel's continuous watching for clojurescript files.)

dnolen18:01:56

@leif you can try - no idea if it will work

dnolen18:01:36

but I thought Figwheel had it's own way of dealing w/ :bundle-cmd to support watching?

leif18:01:54

I know it does for clojurescript files, I wasn't aware for non clojurescript files

leif18:01:02

(Or at least folders outside of the classpath)

leif18:01:09

I'll take a look though, thanks for the suggestion.

leif19:01:59

@dnolen Ya, it looks like its`:watch-dirs` option requires it to be specifically for clojurescript: https://figwheel.org/config-options#watch-dirs, although there does seem to be :css-dirs too....so maybe that will help...

leif19:01:05

Either way though, thank you for pointing this out.