Question: maybe 2 shadow-cljs watches running? no clue otherwise

Asked By
thheller
Asked At
2017-10-13 09:48:12

Found 15 possible answers.

User Answered At Possible Answer
mhuebert 2017-10-13 09:49:55 am watching 3 builds at once for now just my own notes to remember: https://github.com/mhuebert/shadow-eval/wiki i’ll just start a page in the shadow-eval repo wiki is there a wiki page or sth where i should make notes of these JS related Q&A’s / stubs for documentation? with one watch command unless there is something running i’m not seeing
thheller 2017-10-13 10:15:24 yeah I haven’t written down anything yet haha it works looking good so far haha this externs stuff was waaaaaay easier to implement than I expected nice start
mhuebert 2017-10-13 10:30:48 excellent!
thheller 2017-10-13 10:31:40 that should cover almost all externs … as long as you dont use :resolve :target :global thats all exports.thing = {a: 1}; would collect thing and a exports.foo = 1; would collect the foo it collects all assign property names, and creates externs for them what I do is so simple .. for every JS dependency shadow-cljs imports and some dynamic programming things jquery and others do
mhuebert 2017-10-13 10:36:05 that sounds great, i look forward to trying it you parse the js AST for this?
thheller 2017-10-13 10:36:44 yes quite simple actually https://github.com/thheller/shadow-cljs/blob/master/src/main/shadow/build/closure/ReplaceRequirePass.java#L22-L52 but I do this anyways to process the require in JS files
mhuebert 2017-10-13 10:45:30 working at the right depth in the stack / layer of abstraction can make things so simple
thheller 2017-10-13 10:51:00 need to work out how to do this for node but for the browser it seems to actually work reasonably well I’m gonna verify this on my work project now @mhuebert shadow-cljs@2.0.14 has this enabled by default, if you feel like testing. I call this a success pretty much no diff not at all bad, auto is using the generated externs, manual is using the default react externs
Flushing: worker.js (75 bytes)
Flushing: extra.js (136 bytes)
Flushing: demo.js (195684 bytes)
Flushing: react.js (111923 bytes)
Flushing: base.js (181233 bytes)
;; manual
Flushing: worker.js (75 bytes)
Flushing: extra.js (136 bytes)
Flushing: demo.js (195720 bytes)
Flushing: react.js (111923 bytes)
Flushing: base.js (181706 bytes)
;; auto woho nevermind those are part of react-dom crap its missing the lifecycle fns :disappointed: doesn’t look all that bad, thats just React v16 and its deps ShadowJS.prototype.version;
ShadowJS.prototype.updater;
ShadowJS.prototype.unstable_isAsyncReactComponent;
ShadowJS.prototype.unstable_AsyncComponent;
ShadowJS.prototype.type;
ShadowJS.prototype.toArray;
ShadowJS.prototype.thatReturnsTrue;
ShadowJS.prototype.thatReturnsThis;
ShadowJS.prototype.thatReturnsNull;
ShadowJS.prototype.thatReturnsFalse;
ShadowJS.prototype.thatReturnsArgument;
ShadowJS.prototype.thatReturns;
ShadowJS.prototype.setState;
ShadowJS.prototype.result;
ShadowJS.prototype.render;
ShadowJS.prototype.refs;
ShadowJS.prototype.ref;
ShadowJS.prototype.prototype;
ShadowJS.prototype.props;
ShadowJS.prototype.only;
ShadowJS.prototype.name;
ShadowJS.prototype.map;
ShadowJS.prototype.keyPrefix;
ShadowJS.prototype.key;
ShadowJS.prototype.isValidElement;
ShadowJS.prototype.isReactComponent;
ShadowJS.prototype.isPureReactComponent;
ShadowJS.prototype.isMounted;
ShadowJS.prototype.func;
ShadowJS.prototype.framesToPop;
ShadowJS.prototype.forceUpdate;
ShadowJS.prototype.forEach;
ShadowJS.prototype.enqueueSetState;
ShadowJS.prototype.enqueueReplaceState;
ShadowJS.prototype.enqueueForceUpdate;
ShadowJS.prototype.current;
ShadowJS.prototype.createFactory;
ShadowJS.prototype.createElement;
ShadowJS.prototype.count;
ShadowJS.prototype.context;
ShadowJS.prototype.constructor;
ShadowJS.prototype.cloneElement;
ShadowJS.prototype.cloneAndReplaceKey;
ShadowJS.prototype.children;
ShadowJS.prototype.assign;
ShadowJS.prototype._owner;
ShadowJS.prototype.__source;
ShadowJS.prototype.__self;
ShadowJS.prototype.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
ShadowJS.prototype.ReactCurrentOwner;
ShadowJS.prototype.PureComponent;
ShadowJS.prototype.Component;
ShadowJS.prototype.Children;
ShadowJS.prototype.$$typeof;
/* @constructor */ function ShadowJS() {}; still doing a few tests to confirm
mhuebert 2017-10-13 12:03:48 cool, just in the middle of another thing atm but can try later adding something to :npm-deps in deps.cljs does not appear to have any effect, with or without :lein true React appears to work now without supplying any externs manually :slightly_smiling_face: not sure why it would be looking for constants.ts vs constants.js , which does exist decided to try importing firebase, eg. yarn install firebase and then ["firebase/app" :as firebase] . it is supposed to work with webpack etc.; I get:
`ExceptionInfo: no source by name: node_modules/@firebase/util/dist/cjs/src/constants.ts
I can’t believe how fast these advanced builds are that is remarkably similar
thheller 2017-10-13 13:05:31 @mhuebert yes :npm-deps is not finished. you can try shadow-cljs npm-deps but it has some issues
mhuebert 2017-10-13 13:05:47 ok.
thheller 2017-10-13 13:05:51 until thats sorted out you need to trigger the install manually
mhuebert 2017-10-13 13:06:20 does shadow look in the node_modules of dependencies?
thheller 2017-10-13 13:07:13 hmm?
mhuebert 2017-10-13 13:07:45 so Maria depends on Commands which has an npm dependency keypress.js does keypress.js need to be in the node_modules of Maria, or can it be in Commands

Related Questions