This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-27
Channels
- # announcements (1)
- # beginners (71)
- # braveandtrue (4)
- # cider (1)
- # cljs-dev (4)
- # cljsrn (8)
- # clojure (111)
- # clojure-italy (5)
- # clojure-spec (22)
- # clojure-uk (8)
- # clojurescript (80)
- # cryogen (14)
- # cursive (7)
- # data-science (1)
- # datomic (25)
- # dirac (1)
- # figwheel-main (4)
- # fulcro (13)
- # incanter (1)
- # off-topic (6)
- # other-languages (3)
- # pathom (11)
- # portkey (5)
- # re-frame (13)
- # reagent (3)
- # reitit (24)
- # ring-swagger (7)
- # shadow-cljs (63)
- # spacemacs (3)
- # specter (4)
- # tools-deps (9)
Oh all releases of all targets? This will make our builds way slower. Haven't followed but I compile my tests always in parallel for note and haven't noticed anything wrong
@wvelezva shadow-cljs
always tracks the latest CLJS version and it is not recommended to change that. Downgrades are generally not supported. You can use master
in most cases unless there have been breaking changes but I'm not aware of any. There was supposed to be a new release a while ago ...
@richiardiandrea when builds reach a certain size they seem to start failing due to parallel compilation timeouts. (Now reported multiple times). I will add the parallel option back as soon as I figure out what could be happening. Right now I can't explain why it would timeout and that bothers me.
{:source-paths ["src"]
:dependencies []
:builds {"app" {:output-dir "target/"
:asset-path "."
:target :browser
:modules {"main" {:init-fn app.main/main!}}
:devtools {:after-load app.main/reload!
:http-root "target"
:http-port 8080}}}}
I want to use "app"
instead of :app
to indicate that it's specified by me and not part of shadow-cljs' options.
you cannot no. Not sure I see the point. Every key in :modules
is always specified by you, not sure how a string would make that clearer?
but you don't use {"foo": {"bar": 1}}
in JS either to express that it is "your" value.
(I was thinking of webpack config where {foo: {bar: 1}}
is possible and used, not .json
files)
keywords make me think this field will be checked by program and I have to use a certain word there. while I found strings quite flexible and I know it's my choice to name it.
every time I step away from shadow-cljs.edn
for some weeks then looks into it again, I feel a bit confused that :main
is in shadow-cljs' specification and where do I specify the filename.
> The :modules section of the config is always a map keyed by module ID. The module ID is also used to generate the Javascript filename. Module :main will generate main.js in :output-dir.
hello! I want to change cljs code during build. I use build hooks for this. For example, I want to remove some lines from sources with comment ;; exclude-line I did something like this
(defn- update-values [m f & args]
(reduce (fn [r [k v]]
(assoc r k (apply f v args))) {} m))
(defn exclude-dev-code
{:shadow.build/stages #{:compile-finish}}
[build-state]
(update-in
build-state
[:output]
update-values
(fn [value]
(update-in value [:source]
#(clojure.string/replace
%
#"(?s)([^\n]+)\;\; exclude-line"
"")))))
but unfortunately this approach doesn’t work. Can you explain me please what am I doing wrong?@y.khmelevskii not sure I understand what you are trying to do. whats the point of removing a comment?
I want to remove some lines from my sources during compilation. I use comments for marks these lines
would this help? https://shadow-cljs.github.io/docs/UsersGuide.html#_conditional_reading
your hook doesn't work because the :source
in :output
is only used for source map and you are calling it in :compile-finish
which is after CLJS compilation
I want to remove some requires, for example
(ns test.components.app.nav.view
(:require
[ghostwheel.core :refer [>defn =>]] ;; clj-exclude-line
unfortunately conditional_reading doesn’t work in cljs files
got it, thank you! I will try
Hello, i am trying to use quil in my cljs project managed by shadow-cljs, i added [quil "2.7.1"]
to :dependencies
in shaldow-cljs.edn
and use the quil.core
namespace, but it fails to compile with the following error:
The required namespace "org.processingjs.Processing" is not available, it was required by "quil/core.cljc"
This is what i am trying to use https://github.com/quil/quil
Does anyone have any idea on how to use it with shadow-cljs? They have a wiki on how to use it with clojurescript here: https://github.com/quil/quil/wiki/ClojureScript
processing is probably bundled as a foreign-lib ala cljsjs. this is not supported by shadow-cljs. instead you use the npm package directly (assuming there is one)
(ns org.processingjs.Processing
(:require ["processing" :as proc]))
(js/goog.exportSymbol "the-global-quil-uses" proc)
https://www.npmjs.com/package/processing-js is this it? updated 2 years ago?