This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-21
Channels
- # 100-days-of-code (6)
- # aleph (26)
- # beginners (129)
- # boot (5)
- # calva (3)
- # cider (5)
- # cljs-dev (16)
- # cljsrn (4)
- # clojure (204)
- # clojure-dev (36)
- # clojure-italy (23)
- # clojure-nl (4)
- # clojure-spec (221)
- # clojure-uk (60)
- # clojurescript (68)
- # datomic (47)
- # emacs (4)
- # figwheel-main (50)
- # fulcro (29)
- # graphql (10)
- # hyperfiddle (19)
- # lein-figwheel (3)
- # leiningen (20)
- # liberator (3)
- # off-topic (89)
- # onyx (15)
- # pedestal (1)
- # portkey (2)
- # re-frame (3)
- # reagent (6)
- # ring-swagger (1)
- # rum (12)
- # shadow-cljs (10)
- # uncomplicate (4)
- # vim (5)
just seen @shaun-mahood intergrant startup -will use that, cheers
I don't think this is figwheel specific, is there documentation on how you can go about pulling in node dependencies?
@benzap I’m having a lot of luck with these approaches … either https://clojurescript.org/guides/webpack or shadow-cljs https://github.com/thheller/shadow-cljs … it’s still early days on the cljs compiler :npm-deps stuff (https://cljs.github.io/api/compiler-options/npm-deps) so probably better to delegate to webpack or shadow if you’re just starting out
@benzap I recommend learning/using the webpack approach with figwheel-main https://clojurescript.org/guides/webpack
and figwheel-main has an option :npm option to help you with some of the boilerplate https://figwheel.org/config-options#npm
excuse my ignorance, but is npm only useful for node apps or is it generally useful for consuming dependencies for browser clojurescript?
thank you!
I'm a little unclear on how to use the compiler options on https://figwheel.org/docs/compile_config.html
Running lein run -m figwheel.main -- -h
, it seems like I can link a compile-options edn file using -co
, and using the scripting API with the`:options` key.
Is there a way to include the compiler options in a [[build-name]].cljs.edn
file?
@shaun-mahood -co file.cljs.edn
should work same as -co '{:foo :bar}'
@pesterhazy Yes, that part is working fine - I'm wondering if there's a way to include the cljs compiler options directly in the same edn file that my figwheel build is using
Something like this
^{:mode :build-once}
{:main project.main
:optimizations :advanced
:output-to "resources/public/js/main.js"}
(which isn't working for me)Can anyone confirm if failing compilation builds produce a non-zero return value on the commandline? I have a makefile which continues onto the next build step after running a failing compilation ex.
I can confirm that it's producing a 0 return code, when I think it should be producing a non-zero error code when the compilation fails
@bhauman, I should be able to use :closure-defines
in the :options
to figwheel.main.api/start
and expect to be able to evaluate the symbol of the define and not get the default value, right?
I got it figured out over on #clojurescript. 🙂 I didn't have the namespace for the name.
Thanks
@shaun-mahood what command are you trying to execute?
the figwheel options are picked up from -co
but the final behavior is highly dependent on the main option you provide
easier if I just post this: https://github.com/Zap-tech/RecipeBounty/blob/master/deps.edn
it was failing (isn't anymore) and it was throwing a return code of 0, when I think it should have been throwing a non-zero return code
@bhauman do you want me to isolate the issue into something more succinct and file an issue on github? Would add some clarity.
@bhauman I can get the compile options working with co
and by using the scripting api directly, mainly was wondering if there’s a way to define them directly in my dev.cljs.edn
. I think it would help me consolidate a few things between my dev and uberjar builds, but also trying to understand how they relate a bit better.
@shaun-mahood when you say compile options what do you mean specificly?
Clojurescript compiler
Ok, for whatever reason that wasn’t clear originally - I realized that I missed that a while ago but when I tried them in there they weren’t working for me and thought I must have misunderstood somethin else.
In the snippet I posted above, can you see anything clearly wrong to put in a .cljs.edn file? If not then I must have something else messed up, since it will take the figwheel options but not the cljs compiler ones
@shaun-mahood it depends on the full command that you were sending