This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-22
Channels
- # beginners (143)
- # boot (18)
- # chestnut (5)
- # clara (1)
- # cljs-experience (1)
- # cljsrn (13)
- # clojure (290)
- # clojure-austin (4)
- # clojure-italy (13)
- # clojure-nl (21)
- # clojure-russia (14)
- # clojure-spec (49)
- # clojure-uk (59)
- # clojurebridge (7)
- # clojurescript (54)
- # core-logic (2)
- # cursive (22)
- # datomic (149)
- # fulcro (31)
- # graphql (14)
- # hoplon (59)
- # keechma (24)
- # lambdaisland (1)
- # lumo (86)
- # off-topic (3)
- # om (19)
- # om-next (1)
- # onyx (4)
- # portkey (20)
- # re-frame (41)
- # reagent (63)
- # ring (1)
- # ring-swagger (1)
- # spacemacs (9)
- # sql (10)
- # yada (13)
@djanus OK, so CLJS-2333 and https://github.com/google/closure-compiler/pull/2627 fix your problem
just tested locally and react-dnd
“just works”
I’m trying to play with http-kit from planck and am running this command to add it to my classpath, but I’m getting an error
boot --dependencies org.clojars.micha/boot-cp --dependencies http-kit "2.2.0" with-cp -w --file .classpath
java.lang.IllegalStateException: with-cp already refers to: #'boot.task.built-in/with-cp in namespace: boot.user
clojure.lang.ExceptionInfo: with-cp already refers to: #'boot.task.built-in/with-cp in namespace: boot.user
file: "/var/folders/hm/cj8702kn7g58hz0v33mppl3c0000gn/T/boot.user4358301752709614093.clj"
line: 1
thanks, @anmonteiro!
I realised that there are many ways to include something like bootstrap in my project
I had simply included the "//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" in my index.html file
but then I found out about webjars, and also many other packages that package bootstrap-react
I guess including it in index.html
is not great since it means always needing a connection right, but what's the advantage of https://github.com/luxbock/bootstrap-cljs for example over bootstrap from https://www.webjars.org/ ?
is it just being able to modify bootstrap classes and similar things dynamically maybe?
Any idea why I would get Exception in thread "main" java.lang.NoClassDefFoundError: clojure/tools/logging/impl/LoggerFactory
when trying to do lein repl
in a cljs project?
Hi! I'm a newbie to Clojurescript.. can someone point me to a good resource on quickly learning Clojurescript and Reagent?.. I've worked with clojure, JavaScript, react and eventually want to use reframe to build my web app
CLJS does translate function names like some-fn*
to some_fnSTAR
, can I use the function that does this translation? is that available at runtime?
thanks! 🙂
Hello, I’m attempting to upgrade our clojurescript version but for any version past 1.9.562
I no longer see warnings when using (set! *warn-on-infer* true)
. I noticed that it’s meant to be scoped to a file, so I’ve placed it in each file where we use foreign JS libs but when compiling I don’t see warnings. I am able to specify inference hints though and they do make it into my generated externs file. Anyone run into anything similar?
this is a snippet from instaparse, could this be a issue with the clojurescript reader?
(def inside-comment #?(:clj #"(?s)(?:(?!(?:\(\*|\*\))).)*(?x) #Comment text"
:cljs #"(?:(?!(?:\(\*|\*\)))[\s\S])*"))
causes
instaparse.cfg=> :cljs
#"(?:(?!(?:\(\*|\*\)))[\s\S])*"
Unmatched delimiter ).
but
(def inside-comment #"(?:(?!(?:\(\*|\*\)))[\s\S])*")
works.try evaluating just #"(?:(?!(?:\(\*|\*\)))[\s\S])*"
in the repl, not :cljs #"(?:(?!(?:\(\*|\*\)))[\s\S])*"
yes that works. Im attempting to make it run in lumo at the moment, so in my case clj compatability is not needed.
Does anyone have a recommendation for a twilio/video api wrapper, or whether I even need one? Context: video calls in react native app. Should one even bother with their js api, or should I accept I'd have to write it in swift?
@aymat316 some reagent resources listed here https://github.com/Day8/re-frame/blob/master/docs/README.md#domino-5---reagent-tutorials
See also the #reagent channel
I'm trying to compile ES6 style javascript with imports in the CLJS compiler. Is stuff like this supposed to work?
import React from 'react'; export var main = function() { console.log("This is my JSX component: " + <div/>); };
@ingesol yes that can be made to work, can you show me your compiler options?
{:main splort.core :closure-defines {process.env/NODE_ENV "development"} :npm-deps {:react "15.6.1" :react-dom "15.6.1"} :install-deps true :foreign-libs [{:file "js" :module-type :es6 :preprocess cljsjs.babel-standalone/transform}] :asset-path "js/compiled/out" :output-to "resources/public/js/compiled/splort.js" :output-dir "resources/public/js/compiled/out" :source-map-timestamp true}
I'm running this through figwheel by the way, testing how figwheel/cljsbuild/closure performs as a pure JS build tool
looks good to me, what CLJS version are you trying this with?
So imports are supposed to work in project JS files compiled through cljsbuild. I can see that react folder is in my node_modules.
@ingesol thanks for bringing this up
I think we can make this work in CLJS but it currently doesn’t
I’ll work on a patch tonight
I think we currently find the needed npm modules from only .cljs sources
hah, that would make sense
It could (or maybe it does?) look at closure JS
trying that now
but it is probably problematic to check for npm modules that are only used by other JS files that are going to be processed?
Ok, that's what i suspected. So currently the required/imported JS must be required from CLJS to work
@juhoteperi there might be another bug here
it doesn’t work even if I also require react
in CLJS
Could be related to Closure node dependency resolution also, I think there were some difficulties there to resolve files from different "roots"
let me try that
If the JS was inside node_modules/foo, Closure should be able to resolve the dep. Maybe.
Thanks for looking into this! I'm writing a blog post about "Leiningen as a JS build tool", but it's much less interesting without JS imports.
@juhoteperi I actually think that module roots doesn’t really matter in this case
I’m just puzzled that this doesn’t work, given that my mental model is that we’re passing all the dependencies along when processing these modules
just opened https://dev.clojure.org/jira/browse/CLJS-2334 to track this case