Closed 1j01 closed 8 years ago
Hi @1j01,
I understand the way you do to use the library will also work, but most users will use webpack or browserify to bundle their project, and therefore include react-mdl using the same way.
Either way, I also believe a "getting started" document might help people to better understand how to use the lib. Would you want to help on this?
Yes, it should explain how to use it with webpack or browserify. I'd be using one of those if I could get a live-reloading working with either. So, were you thinking this should be a separate document? I was thinking of just having all the information on the README, except for the external examples (which benefit from the interactivity). In other words, READMEs are generally the getting started documents, no? Not that it matters that much.
Having it in the readme is fine, unless it becomes too big. Either way, we can start with that and move it in another file later if necessary.
Sounds good, I'll send a PR soon.
When I was getting started with this project I had no idea how to include and access the library. I ended up creating my own browser bundle with browserify, which worked for a while until I ran into a problem because my bundle contained a second copy of React. I only found out from this closed issue that there is already a browser bundle,
ReactMDL.js
. It's just only onnpm
and not in the repo, even though there's lots of other stuff in the repo for distribution purposes. (I've since updated my usage, getting rid of webpack.)The README should explain how to install and include the library. You don't need to
import
it (which isn't supported in major browsers), or use browserify or webpack, you can just copynode_modules/react-mdl/out/ReactMDL.js
to alib
orvendor
folder and include it as a script (unless you have a setup where you can rely on the existence ofnode_modules
)I could create a PR with some improvements.