This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-11
Channels
- # aleph (3)
- # beginners (42)
- # cider (219)
- # cljs-dev (39)
- # cljsjs (19)
- # cljsrn (3)
- # clojure (97)
- # clojure-canada (12)
- # clojure-dev (14)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (3)
- # clojure-uk (140)
- # clojurescript (52)
- # clojutre (2)
- # cursive (2)
- # datomic (29)
- # docs (1)
- # duct (13)
- # emacs (19)
- # fulcro (8)
- # funcool (2)
- # graphql (26)
- # hyperfiddle (1)
- # luminus (9)
- # nyc (7)
- # off-topic (26)
- # om (21)
- # onyx (19)
- # overtone (1)
- # pedestal (4)
- # re-frame (10)
- # reagent (109)
- # ring (5)
- # rum (15)
- # shadow-cljs (120)
- # spacemacs (22)
- # specter (7)
- # vim (10)
Hey, to check me understanding of cljs compiler... I'm thinking of replacing doo's usage of cljs.build.api/watch
with hawk to give us more control over the watching behavior. I'd need to re-implement the logic that is in cljs.closure/watch
, but that's all, right?
Has someone checked if scoped npm modules work with latest Closure-compiler?
Oh well I found existing configuration
Compiling build :client-npm to "target/cljsbuild/client-npm/public/js/main.js" from ["src"]...
path.js:39
throw new ERR_INVALID_ARG_TYPE('path', 'string', path);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type boolean
at assertPath (path.js:39:11)
at Object.resolve (path.js:1090:7)
at Deps.<anonymous> ([eval]:204:40)
at Deps.emit (events.js:187:15)
at endReadableNT (/home/juho/Source/reagent/examples/material-ui/node_modules/readable-stream/lib/_stream_readable.js:1010:12)
at process._tickCallback (internal/process/next_tick.js:174:19)
Looks like our code might have some problems nowthis looks similar to what I saw: https://clojurians.slack.com/archives/C07UQ678E/p1530714993000368
No I think that is from our module-deps code
The node module indexing
Foreign libs providing and using global-exports with scoped names, like @material-ui/core/styles
also have some problems
I'll finish my material-ui example with old foreign-libs names and look at this later.
The problem with global-exports might be just that the key must be symbol, not string, which is required if name has multiple /
Yeah: https://github.com/clojure/clojurescript/blob/master/src/main/clojure/cljs/compiler.cljc#L1262
I'm looking through cljs.core
, and I see some types implementing equiv
on Object
. I can't find where this method is documented and/or used? (is this gclosure, js core..?)
If equiv
is meant to be public / stable, we have a place where that kind of stuff is documented https://clojurescript.org/reference/javascript-api
But perhaps equiv
is really just an implementation detail?
while I don’t know why anybody would use it outside of ClojureScript it is useful for people writing libraries like Transit
Two patches ready: https://dev.clojure.org/jira/browse/CLJS-2814 https://dev.clojure.org/jira/browse/CLJS-2815
These fix scoped npm names in foreign-libs, or more specifically, using strings with :global-exports
browser entry here breaks node module indexing, at least for @material-ui/core and probably for react-slate also: https://unpkg.com/[email protected]/package.json
It is supposed to mean that if global package is loaded, min-document and process packages should be ignored
@juhoteperi hrm I don’t follow
browser entry of a node package can control if other packages should be ignored (or replace them with other files)
so the global package is trying to get this package ignored: https://www.npmjs.com/package/min-document
anyway, we can probably just ignore non-string values for browser entries
@juhoteperi the browser
field as an object is quite often use to override specific requires as well, eg. "browser":{"./foo.js":"./foo-browser.js"}