This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-27
Channels
- # aleph (1)
- # beginners (48)
- # cider (34)
- # clojure (27)
- # clojure-dev (15)
- # clojure-uk (21)
- # clojurescript (27)
- # data-science (3)
- # datomic (10)
- # instaparse (30)
- # lumo (85)
- # off-topic (3)
- # perun (2)
- # portkey (24)
- # re-frame (13)
- # reagent (17)
- # ring (1)
- # shadow-cljs (77)
- # spacemacs (1)
- # test-check (3)
- # yada (4)
Whatever I change content, page in browser reload without any errors, but content on page doesn’t change. I have to reload browser each time manually. Am I doing something wrong?
Is there a way to not write:
["@material-ui/core/Styles" :default Styles]
["@material-ui/core/AppBar" :default AppBar]
["@material-ui/core/Toolbar" :default Toolbar]
["@material-ui/core/Typography" :default Typography]
["@material-ui/core/Button" :default Button]
...
It is not shadow-cljs question probably, but how to translate into cljs:
const styles = {
root: {
flexGrow: 1,
},
};
function SimpleAppBar(props) {
const { classes } = props;
return (
<div className={classes.root}>
<AppBar position="static" color="default">
<Toolbar>
<Typography variant="title" color="inherit">
Title
</Typography>
</Toolbar>
</AppBar>
</div>
);
}
SimpleAppBar.propTypes = {
classes: PropTypes.object.isRequired,
};
export default withStyles(styles)(SimpleAppBar);
while I am using reagent with hiccup.in 2.3.27
I finally merged the :build-hooks
stuff I had laying around since forever. should have done this way sooner but here it is now: https://shadow-cljs.github.io/docs/UsersGuide.html#build-hooks
@mhuebert ^ might be interesting to you since I know you do a lot of custom clj-run
stuff already
@kurt-o-sys you also asked about generating an index.html
for the build. :build-hooks
could now do stuff like that.
I was wondering if any of the additional data from the build stage would be available, like the Nevermind, found it in :info
key that is part of the build log event (eg. to know which files have been compiled).:shadow.build/build-info
is the watched & changed file that triggers a build noted in the build state somewhere?
so for each :sources
where :resource-id
is contained in :compiled
gives you the sources that were recompiled
yeah, I was doing something like that in the client
active-namespaces (set (keys (:cljs.analyzer/namespaces @carton/compiler)))
compiled-namespaces (-> (:sources @bootstrap-env/index-ref)
(select-keys compiled)
(vals)
(->> (filter (comp active-namespaces :ns))))
then i used made a ring handler that serves arbitrary resources from the classpath and requested the original clj* files to eval directly via self-host
i am still just experimenting, with what kind of dev experience might be nice when building selfhost-compatible things.
this stuff is to allow for editing from intelliJ, with all changes going into a live environment in the browser
so you can have a nice tree of all your namespaces, with various def
’d things appearing in arbitrary/nice ways
some things in common with devcards but more like a general namespace browser + ability to layer custom views where you want
not entirely sure. it could be an augmentation to a version of maria (or something like it) which runs locally, and is also updated from files, but you have the full compiler state on hand
i was also looking at making a little API in the handler for exposing more things from the compiler-state,
I did a few tests with pathom
for using graph queries to expose shadow-cljs internal data
which could technically be used to let you query the entire cljs.analyzer state for whatever you'd need
I added http://localhost:9630/repl as the first basic test
pathom
looks promising in that the same description of analyzer data could be resolved on the shadow side or in the browser, depending on which compiler-env you wanted to inspect
hmm is there a way to type into http://localhost:9630/repl