This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-21
Channels
- # aws-lambda (12)
- # beginners (20)
- # boot (1)
- # clara (15)
- # clojure (17)
- # clojure-dev (6)
- # clojure-greece (4)
- # clojure-russia (4)
- # clojure-spec (27)
- # clojure-uk (3)
- # clojurescript (22)
- # cursive (1)
- # data-science (3)
- # datomic (4)
- # fulcro (2)
- # juxt (2)
- # leiningen (2)
- # lumo (19)
- # protorepl (13)
- # re-frame (42)
- # reagent (5)
- # ring-swagger (1)
- # shadow-cljs (89)
- # spacemacs (1)
- # uncomplicate (3)
var ResponderEventPlugin;
var SimpleEventPlugin;
var TapEventPlugin;
var EnterLeaveEventPlugin;
var ChangeEventPlugin;
var SelectEventPlugin;
var BeforeInputEventPlugin;
but even when it compiles fine it doesn’t quite work, no event handlers ever trigger
I updated the externs in re-view
to the latest from CLJSJS and now it compiles and runs for me. pushed the updated template.
must have been some symbols related to event handling that were munged but did not cause errors..
still trying to fix source maps for :advanced
when JS deps are used. can’t quite figure it out.
fixed in [email protected]
this is the repo. shadow-re-frame/provide-js-deps
+ the :resolve
options in shadow-cljs.edn are a workaround to use libs that require cljsjs stuff
https://code.thheller.com/blog/shadow-cljs/2017/09/15/js-dependencies-going-forward.html
but i don’t have control over those libraries. so I require the same deps from node_modules in the provide-js-deps
namespace and set the global var that the lib expects
I don’t think there is any good option because non-shadow build tools have no way to include libs that are not Closure compatible except via foreign libs?
{:foreign-libs
[{:file "cljsjs/react/development/react.inc.js",
:provides ["react" "cljsjs.react"],
:file-min "cljsjs/react/production/react.min.inc.js",
:global-exports {react React}}],
:externs ["cljsjs/react/common/react.ext.js"]}
right. so if d3 would add :global-exports
to cljsjs then maybe it works.
i wonder if, given the “react” in :provides
, the react
in :global-exports
is redundant?
I have no idea really, it seemed confusing to me which is why I did the :resolve
thing
I’m open to ideas … I might just re-enable foreign-libs as a last resort but I really don’t want to 😞
so this hack doesn’t work, in the end, because the :resolve stuff mapping cljsjs.*
to global vars runs before the global var is defined
I might just create a bunch of those and create a shadow-cljs-foreign-libs
package or so
am getting this:
shadow.js.provide("module$cljsjs_d3", function(global,require,module,exports) {
module.exports=(d3);
});
@mhuebert you can get rid of a bunch of closure warnings by setting :compiler-options {:closure-warnings {:global-this :off}}
ok closure works fine again … until you want custom :resolve
… not sure how I bring that into Closure yet
The required namespace "cljsjs.react.dom.server" is not available, it was required by "reagent/dom/server.cljs".
updated template to 0.4.6 (keep forgetting to update both project.clj and shadow-cljs.edn)
i was switching to some older versions of reagent while trying to get re-frame-trace to work. had to patch it to work with react 16.
shadow-re-frame is compiling for me with closure but i’ve got externs problems again
no externs problems with :release using shadow as js provider, but with closure, EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering,
mk`.` again
user-options at command line: https://github.com/SBoudrias/Inquirer.js (less complex than a full-blown view layer -- this is what firebase-tools uses)