This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-02
Channels
- # beginners (98)
- # bigdata (1)
- # bitcoin (1)
- # boot (32)
- # cider (20)
- # cljs-dev (57)
- # cljsrn (130)
- # clojure (93)
- # clojure-dusseldorf (1)
- # clojure-germany (1)
- # clojure-greece (3)
- # clojure-italy (2)
- # clojure-russia (203)
- # clojure-spec (14)
- # clojure-uk (50)
- # clojurescript (127)
- # css (7)
- # cursive (6)
- # data-science (1)
- # datomic (4)
- # emacs (1)
- # events (1)
- # fulcro (8)
- # funcool (12)
- # graphql (7)
- # jobs (1)
- # lein-figwheel (2)
- # luminus (2)
- # off-topic (7)
- # om (16)
- # onyx (4)
- # parinfer (17)
- # pedestal (6)
- # portkey (36)
- # proton (3)
- # re-frame (10)
- # shadow-cljs (140)
- # spacemacs (12)
- # specter (1)
- # sql (1)
- # vim (10)
- # yada (10)
The required namespace "cljsjs.highlight" is not available, it was required by "respo_markdown/main.cljs".
Oct 02, 2017 1:47:40 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: node_modules/highlight.js/lib/languages/actionscript.js:1: ERROR - required "shadow.js" namespace never provided
goog.require("shadow.js");shadow.js.provide("module$node_modules$highlight_js$lib$languages$actionscript", function(require,module,exports) {module.exports = function(hljs) {
^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 02, 2017 1:47:40 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: node_modules/highlight.js/lib/languages/ada.js:1: ERROR - required "shadow.js" namespace never provided
goog.require("shadow.js");shadow.js.provide("module$node_modules$highlight_js$lib$languages$ada", function(require,module,exports) {module.exports = // We try to support full Ada2012
^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 02, 2017 1:47:40 PM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: node_modules/highlight.js/lib/languages/apache.js:1: ERROR - required "shadow.js" namespace never provided
goog.require("shadow.js");shadow.js.provide("module$node_modules$highlight_js$lib$languages$apache", function(require,module,exports) {module.exports = function(hljs) {
^^^^^^^^^^^^^^^^^^^^^^^^^
for highlightjs issue, I end it up with https://cdnjs.com/libraries/highlight.js ...
@jiyinyiyong read BREAKING CHANGE section about :foreign-libs
https://code.thheller.com/blog/shadow-cljs/2017/09/15/js-dependencies-going-forward.html
should be fixed in 2.0.5
. it is not ideal to use their npm
package since that will unconditionally include support for ALL languages
probably best to build your own via https://highlightjs.org/download/
:js-options
{:resolve
{"highlight.js"
{:target :file
:file "lib/highlight.pack.js"}}}
but does matter for now the npm package should work, its just bigger than it needs to be
on my site I just did this once https://highlightjs.org/download/
https://code.thheller.com/blog/shadow-cljs/2017/09/15/js-dependencies-going-forward.html
but I can’t add support for :foreign-libs
without creating more issues than its worth
given that it will probably be updated very infrequently I think the manual build is fine for now
https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/cljs/npm/externs.js
shadow-cljs check your-build
should tell you that initHighlightingOnLoad
is an unknown property
externs basically just tell the closure compiler about names it is not allowed to remove or rename
the danger is in overly generic externs since they might prevent code from being removed that you weren’t actually using
I think it's working now http://repo.respo.site/markdown/
I mean, when I access a DOM Element, define a local variable, and use (.-x el)
to access it
then it wasn’t target
? or the Closure Compiler thought it was not of type Event
and renamed it
but anyways .. externs are really simple … it is just external names really. so if the closure compiler find a name it doesn’t recognize it know what to do with it
see you example. it didn’t recognize hljs.initHighlightingOnLoad
so it renamed it to hljs.Qc
"input" {:type :input, :value (aget (.-target event) "value")}
"change" {:type :change, :value (aget (.-target event) "value")}
if I use (.-value (.-target event))
the value
part will be renamed, but it should be event.target.value
but as I said .. the compiler might get confused about event
and not use the correct type
well... not sure now, it was old codebase. I was trying to solve that with externs, but didn't managed to do it.
can shadow-cljs co exist with figwheel ?
@geraldodev sure but it can do almost anything that figwheel does, so why would you want to? 🙂