This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-16
Channels
- # architecture (12)
- # aws (8)
- # bangalore-clj (1)
- # beginners (172)
- # boot (25)
- # chestnut (3)
- # cider (15)
- # cljsrn (5)
- # clojure (170)
- # clojure-india (1)
- # clojure-italy (21)
- # clojure-nl (87)
- # clojure-romania (3)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-uk (79)
- # clojurescript (79)
- # cursive (2)
- # datomic (29)
- # dirac (26)
- # emacs (7)
- # fulcro (13)
- # jobs (4)
- # juxt (22)
- # lein-figwheel (1)
- # leiningen (2)
- # lumo (39)
- # nrepl (1)
- # off-topic (54)
- # onyx (124)
- # pedestal (1)
- # planck (4)
- # portkey (1)
- # re-frame (36)
- # reagent (2)
- # ring-swagger (8)
- # shadow-cljs (107)
- # spacemacs (1)
- # specter (25)
- # sql (7)
- # tools-deps (5)
- # vim (10)
- # yada (25)
Cool, yeah something like that. Search definitely needs improvement. Also was thinking some backup mechanisms
what would be the best way, in a shadow-cljs build to include CSS that's bundled with an NPM module? For the javascript itself, i'm using the shadow-cljs Guide's recommendation of "some-lib" :default SomeExport
in the ns :require, etc., but not sure how to include the CSS. In JS I could use a similar import statement for the CSS, but here I've resorted to copying the file out of the npm_modules subdir and into my :http-root
@samuel.wagen yeah CSS "includes" are not yet supported. didn't have time to work on it yet.
Nothing to point to really. I have a basic idea for a concept but nothing implemented yet.
maybe sass/less could stay like the current include of own js files - the processor runs externally and shadow-cljs only deals with the produced artifacts (https://shadow-cljs.github.io/docs/UsersGuide.html#_javascript_dialects)
problem is you can't process them one by one. you need to collect all and then process them together
I will probably do a "simple" version first that doesn't do anything and just records which resources were "included"
If I get it well, cljsjs packages don't work pretty well with shadow-cljs? At least, I can't make it work with [cljsjs/auth0-lock "11.5.2-0"]
So I tried to add the auth0-lock
to package.json
"dependencies": {
"auth0-lock": "^11.6.1",
...
}
but than, I get this:
The required JS dependency "auth-lock" is not available, it was required by "ui_app/components/navbar.cljs".
You probably need to run:
npm install auth-lock
(and I ran npm install auth-lock already a few times, but it's still the same...)
I guess I must be missing something 😛
oh... sh*t
thx a lot for solving this extremely hard bug 😉
the :cljs/quit
didn't timeout? I can't see what you sent before the first :cljs/quit
and :cljs/quit
technically cannot timeout since it is never sent to the client
I suspect that you are in a CLJ REPL already? I cannot tell which client you are using. are you running standalone or embedded? too many moving parts, need to narrow it down
yes I recognize that error but I need to know what triggered it. so you must have sent something but I can't see what was sent
now hitting this:
[:app] Compiling ...
[:app] Build failure:
The required namespace "net.cgrand.xforms" is not available, it was required by "ankify/frontend/util/dom.cljs".
since you are running the embedded version: what else are you doing in the VM? use tools.namespace or anything like that?
not getting more warnings
[:app] Compiling ...
[:app] Build completed. (928 files, 2 compiled, 0 warnings, 0.78s)
[:app] Compiling ...
[:app] Build failure:
The required namespace "net.cgrand.xforms" is not available, it was required by "ankify/frontend/core.cljs".
yeah sorry. not a clue. is that after a fresh restart or still in this broken state?
tools.namespace
can critically mess with the internal state of the shadow-cljs server runtime
log4j.rootLogger=INFO, console
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=[%d{HH:mm:ss,SSS}] %m%n
log4j.logger.shadow=DEBUG
I use the repl because I want to get rid of the command line. There are to many build commands that need to be run in a certain order etc to get a project going. My current setup I run one Clojure function in the repl and it takes care of shadow-cljs and the backend. Is there a way to manage multiple Clojure repls each with their own jvm from one (master-)repl?
unfortunately it is not so easy to completely isolate shadow-cljs due to clojure being hard to isolate
the config only logs to the console since that is what I'm using for shadow-cljs but it should be printing more info
[10:59:38,136] classpath updates total:2
[10:59:38,137] classpath update [:mod] C:\Users\thheller\code\shadow-cljs\src\ui-release\shadow\cljs\ui\dist\js\ui.js
[10:59:38,205] classpath update [:mod] C:\Users\thheller\code\shadow-cljs\src\ui-release\shadow\cljs\ui\dist\js\ui.js
[10:59:38,271] :shadow.cljs.devtools.server.system-msg/resource-update {:namespaces #{module$shadow$cljs$ui$dist$js$ui}, :deleted #{}, :updated #{module$shadow$cljs$ui$dist$js$ui}, :added #{}}
@thheller followed your instructions but it doesn’t seem to work, only getting warnings
[15:29:41,605] XNIO version 3.3.8.Final
[15:29:41,639] XNIO NIO Implementation Version 3.3.8.Final
15:29:42.237 WARN [shadow.build.classpath] (nREPL-worker-1) failed to inspect resource "/Users/den/Dropbox/dev/code/vimsical/web-stack/resources/templates/frontend/core.cljs", it will not be available.
15:29:49.381 WARN [shadow.build.classpath] (nREPL-worker-1) failed to inspect resource "jar:file:/Users/den/.m2/repository/vimsical/web-stack/0.1.01/web-stack-0.1.01.jar!/templates/frontend/core.cljs", it will not be available.
15:29:49.610 WARN [shadow.build.babel] (nREPL-worker-1) can't find node_modules/shadow-cljs/cli/dist/shadow.cljs.npm.transform.js, please install npm install --save-dev shadow-cljs.
shadow-cljs - HTTP server for :app available at
shadow-cljs - server running at
shadow-cljs - socket repl running at localhost:61783
shadow-cljs - nREPL server started on port 61785
[:app] Configuring build.
[:app] Compiling ...
[:app] Build completed. (928 files, 3 compiled, 0 warnings, 7.10s)
[:app] Compiling ...
[:app] Build failure:
The required namespace "net.cgrand.xforms" is not available, it was required by "ankify/frontend/util/dom.cljs".
It worked initially through a several compilation, then the repl timeout caused me to restart the repl, then it didn’t work, the I deleted the compiled js, restarted intellij. now it works
however, when using it on the client-side (it's a peer dependency of another npm package, graphql-tag
, which translates GraphQL strings to an AST), I get this error:
source.js:15 Uncaught TypeError: Cannot call a class as a function
at new C.Source (source.js:15)
at C.parse (parser.js:34)
at c (graphql-tag.umd.js:136)
...
it seems to not be passing this check:
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /**
the offending line:
var sourceObj = typeof source === 'string' ? new _source.Source(source) : source;
hey it looks like https://shadow-cljs.github.io/docs/UsersGuide.html is down