wdjungst / react-project

State of the art web development with React.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Static folder contains scripts without any version management

agalitsyn opened this issue · comments

From my point of view it's better to add files Promise.min.js, es5-shim.min.js, fetch.min.js to package.json and use them from lib, not just static files

sure, change your app's Document.js and server them from wherever you want :)

Ok, I just wanted to help with feedback, because your project is awesome. I spent a lot of time
searching "right" starter kit for react, and yours seems closer to real production webapps (router, handling head title, server rendering, nice toolkit for development, etc). My thoughts was that using versioned scripts from bower or npm is better practice, than local one, thats it :)

the shims are the only things not in package management, if you can think of a better way to handle it, go for it, but here's why I did it this way:

  1. we don't want to load the shims unless the app needs them, that's why the document does a feature detection first, before including the script
  2. we don't know about the files in the build because we don't want to include them in the build (see #1)
  3. many of those shims don't publish a minified version to npm

So ... we just include them manually

I'm sure if I spent a bit more time thinking about it, I could get it into package management, but I haven't. Feel free to do so yourself, but consider those 3 constraints.