This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-11
Channels
- # admin-announcements (9)
- # arachne (1)
- # boot (125)
- # cider (5)
- # clara (34)
- # cljs-dev (11)
- # cljsjs (19)
- # clojure (164)
- # clojure-greece (7)
- # clojure-nl (2)
- # clojure-russia (5)
- # clojure-spec (3)
- # clojurescript (28)
- # clojurex (4)
- # core-async (3)
- # cursive (2)
- # datomic (3)
- # hoplon (268)
- # jobs (4)
- # keechma (2)
- # lambdaisland (1)
- # lein-figwheel (5)
- # leiningen (5)
- # off-topic (3)
- # om (3)
- # onyx (16)
- # re-frame (5)
- # reagent (31)
- # robots (1)
- # spacemacs (3)
- # specter (89)
- # untangled (1)
- # yada (26)
hello all ... first post here so please forgive me if I mess it up. a question about cljs and namespaces
I used the lein template for reagent, so I have under my main directory the "src" directory. Under there I have 3 subdirectories: clj, cljc, and cljs. In src/cljs/charts/charts.cljs, I want to require a function found in src/clj/db/db.clj ... how do I require this?
FWIW, in the project file I have under :cljsbuid a :min and an :app, each which has a :source-paths where I added "src/clj"
Am I missing something obvious here:
> (js->clj (clj->js {:a 1}))
;;=> {"a" 1}
> (js->clj (clj->js {:a 1}) {:keywordize-keys true})
;;=> {"a" 1}
Just updated my build scripts, does figwheel and cljs builds: https://gist.github.com/rauhs/2a02e5e04b5bd4e4b4b5
so , i need not include the namespace @rauh
hi , i am trying to use cljsjs/facebook packages in my build.boot i include the dependency [cljsjs/facebook "v20150729-0"] and in my app.cljs file i include the namespace [cljsjs.facebook] , iam getting the following error "No such namespace: cljsjs.facebook, could not locate cljsjs/facebook.cljs,"
@vinodgandamalla: You don't need to require it. Just use the facebook API in your code
@rauh k thanks
@ag requiring node modules already works https://gist.github.com/nasser/aec17edb60a546aae6e588d6f891d963
@bhauman on node, 0.5.4-snapshot sends my test results to both the node process & my repl, is there a knob to disable printing to the repl?
@pat: before your test runner you will need to bind the print-fn to what you want it to be https://github.com/bhauman/lein-figwheel/blob/master/support/src/figwheel/client.cljs#L49
My CLJS project has three subdirectories under src: clj, cljc, cljs. How can I reference a function in src/clj/db/db.clj from src/cljs/charts/charts.cljs ? (ns charts.charts .... :require [db.db :as db] does not seem to work.
@joshjones: How is a JVM function supposed to work on JavaScript?
@joshjones: you cannot load .clj
files in ClojureScript unless it’s a macros file
@joshjones: there’s a pretty active #C0620C0C8 channel