This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-08
Channels
- # 100-days-of-code (4)
- # aws (1)
- # beginners (69)
- # business (1)
- # calva (1)
- # cider (10)
- # cljdoc (1)
- # cljs-dev (7)
- # clojure (49)
- # clojure-dev (4)
- # clojure-italy (2)
- # clojure-nl (11)
- # clojure-russia (2)
- # clojure-spec (7)
- # clojure-uk (64)
- # clojurescript (18)
- # clojurex (1)
- # core-async (11)
- # cursive (22)
- # datascript (7)
- # datomic (45)
- # editors (6)
- # emacs (7)
- # events (1)
- # fulcro (20)
- # graphql (1)
- # jobs (18)
- # jobs-discuss (132)
- # leiningen (2)
- # nyc (5)
- # off-topic (6)
- # onyx (2)
- # pedestal (3)
- # re-frame (8)
- # remote-jobs (6)
- # ring-swagger (2)
- # shadow-cljs (64)
- # specter (2)
- # tools-deps (4)
- # unrepl (1)
- # yada (3)
I want to use goog.html.SafeHtml
class https://google.github.io/closure-library/api/goog.html.SafeHtml.html and calls its static function SafeHtml.htmlEscape
. I tried using (:import (goog.html SafeHtml))
then calling the static function (SafeHtml/htmlEscape "foo")
but the compiler throws No such namespace: goog.html.SafeHtml, could not locate goog/html/SafeHtml.cljs, goog/html/SafeHtml.cljc, or JavaScript source providing "goog.html.SafeHtml"
@hee-foo i'm using [org.clojure/clojurescript "1.10.339"]. it doesn't work when using :import
@mavbozo I suspected as much. I have encountered something similar a while ago, i remember i figured why this is happening, but forgot about that. Avoid using names that begin with capital
when targeting nodejs, is there a way to have cljs include the node_modules from npm-deps in the build?
I'm not aware of it. I target nodejs for lambda. To package the node_modules I use a bash script.
See here:
Thanks, Ive resorted to just copying my node_modules manually via script too.
Actually and I realise that I swapped a while ago to resolve node modules via npm directly rather than lein-npm so the above is not what you asked for.