These are chat archives for chandu0101/scalajs-react-components

25th
Oct 2016
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:29
for css there is really no avoiding loading it into the global css namespace
you could load it async
there is some code in the demo project to do that, iirc
@tksfz
@tksfz
Oct 25 2016 05:29
there's WithAsyncScript
I didn't see anything like it for css
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:30
yes exactly
you could check the git history for the file, i think at some point it loaded css too
@tksfz
@tksfz
Oct 25 2016 05:31
oh ok i can use WithAsyncScript with css?
ahh
ok
i'll look thank you
thats the code generator
@tksfz
@tksfz
Oct 25 2016 05:31
oh awesome thank you
yes semantic-ui-react has propTypes and such
so i think it should work similarly
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:31
buut, im not sure how useful it will be to you
there is code to parse javascript files into an ast with nashorn
@tksfz
@tksfz
Oct 25 2016 05:31
i think it will work i think it is formatted the same as material-ui
oh
ah
i was thinking it would just be regexes more or less
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:32
and then grab propTypes from that ast
@tksfz
@tksfz
Oct 25 2016 05:32
or even simpler than regexes
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:32
and then a semi-manual type mapping
@tksfz
@tksfz
Oct 25 2016 05:32
ah ok i was thinking of something much dumber
yes there are a plethora of types
so it will be a bit of work
i burned two days
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:33
but the thing that is really not working too well is the logic for resolving javascript files
@tksfz
@tksfz
Oct 25 2016 05:33
because it just so happened that the day i npm install'ed semantic-ui-react
they published a bad version missing the dist directory
i burned two days trying to figure out what the heck i did wrong haha
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:33
haha, only with javascript libs xD
@tksfz
@tksfz
Oct 25 2016 05:33
ah ok yes i was thinking of something much dumber
i would glob some files
pull out propTypes regex etc
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:34
that would also work, it might even be easier
@tksfz
@tksfz
Oct 25 2016 05:34
it wouldn't be nearly so automated and would only work for semantic-ui's file layout or whatever
so it wouldn't generalize btu i think it would be good enough for me
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:35
not much is needed
even hard coding paths would just be a two minute job
@tksfz
@tksfz
Oct 25 2016 05:35
right
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:35
it was my plan to generalize that code, but you know, time
@tksfz
@tksfz
Oct 25 2016 05:35
ehhe of course
anyway this might be a bit of a slog
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:36
anyway, i will be afk most of today
@tksfz
@tksfz
Oct 25 2016 05:36
ok np
Øyvind Raddum Berg
@oyvindberg
Oct 25 2016 05:36
but feel free to shoot questions
@tksfz
@tksfz
Oct 25 2016 05:36
thank you