This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-12
Channels
- # bangalore-clj (4)
- # beginners (77)
- # boot (71)
- # cider (10)
- # clara (1)
- # cljs-dev (52)
- # cljsjs (28)
- # cljsrn (1)
- # clojure (390)
- # clojure-dev (5)
- # clojure-india (1)
- # clojure-italy (5)
- # clojure-nl (24)
- # clojure-poland (4)
- # clojure-russia (123)
- # clojure-spec (71)
- # clojure-taiwan (2)
- # clojure-uk (8)
- # clojurescript (236)
- # core-matrix (6)
- # cursive (19)
- # datomic (16)
- # defnpodcast (2)
- # editors (1)
- # emacs (36)
- # garden (2)
- # hoplon (5)
- # jobs (1)
- # jobs-discuss (10)
- # juxt (47)
- # luminus (4)
- # lumo (6)
- # off-topic (207)
- # om (1)
- # onyx (20)
- # pedestal (40)
- # perun (2)
- # re-frame (8)
- # reagent (48)
- # ring (2)
- # ring-swagger (2)
- # specter (13)
- # unrepl (89)
- # vim (6)
@juhoteperi would you give me some advice re: my message just above?
@frederic Both options are fine. Keeping the currents paths is okay, but I guess changing them also is fine as I think it should only cause minimal breakage, foreign-libs get automatically used from new paths and probably users get compile time errors if the css path has changed.
I think I’ll change them then. It doesn’t seem to have a lot of traction on clojars, might as well get it right with limited breakage
@juhoteperi I found out that building cljsjs packages (boot package install target) on windows boxes can result in invalid deps.cljs files
{:foreign-libs [{:file "cljsjs/quill/development/quill.inc.js", :provides ["cljsjs.quill"], :file-min "cljsjs/quill/production/quill.min.inc.js"}], :externs ["cljsjs\\quill\\common\\quill.ext.js"]}
I believe the problem could be fixed by a simple string substitution in cljsjs.boot-cljsjs.packaging/deps-cljs
Hmm. why do :file and :file-min work correctly but not :externs
they all use boot.core/tmp-path
The only difference I can see is that quill.ext.js comes directly from the resources directory on a windows file system, while quill.inc.js and quill.min.inc.js are sift :moved from a downloaded, uncompressed .tar.gz archive
However, both are valid windows paths (although they’re rarely used, forward slashes are valid path separators even on windows)
So, I would argue that, although it would be nicer if boot were more consistent, what they are doing is not technically incorrect
Hey, I'm seeing something kinda weird... I'm using this as my (manually-built) deps.cljs
:
{:foreign-libs [{:provides ["cljsjs.react-three-renderer"]
:requires ["cljsjs.react" "cljsjs.react-dom" "cljsjs.three"]
:file "cljsjs/react-three-renderer/development/react-three-renderer.inc.js"
:file-min "cljsjs/react-three-renderer/production/react-three-renderer.min.inc.js"}]
:externs ["cljsjs/react-three-renderer/common/react-three-renderer.ext.js"]}
...but then in my compiled sources for an app using this library I see this:
% grep -r react_dom *
resources/public/js/compiled/out/cljs_deps.js:goog.addDependency("../cljsjs/react-three-renderer/development/react-three-renderer.inc.js", ['cljsjs.react_three_renderer'], ['cljsjs.react', 'cljsjs.react_dom', 'cljsjs.three']);
...and the JS throws an error Undefined nameToPath for cljsjs.react_dom
, apparently having mangled the name to use underscores instead of dashes
Underscores are changed to dashes
But you should use "cljsjs.react.dom"
in :requires
anyway
Like here: https://github.com/cljsjs/packages/blob/master/react-mdl/resources/deps.cljs#L5
Aha. I'll check that, thanks @juhoteperi
Though that's pretty much the same thing that I already mentioned in #clojurescript