banderson / generator-redux

CLI tools for Redux: next-gen functional Flux/React with devtools
252 stars 36 forks source link

ES6 generator and package.json updates #18

Closed geekjuice closed 8 years ago

geekjuice commented 8 years ago

Rewrote index.js in ES6 with npm run build and npm run watch scripts for development.

In addition, changes how package.json is written. Rather than depending on this.npmInstall to save the deps, it will now fetch the version from the npm registry directly and write them out to dependencies and devDependencies. The reason for this was because certain packages seemed to cause this.npmInstall with {save: true} or {saveDev: true} to fail quietly (on node v4.x.x). Specifically, cssnext-loader seemed to prevent any of the devDependencies from being saved to package.json. If the fetch fails, the line will default to pkgName: *. Another benefit of fetching the versions directly is the option to defer installing them after the scaffolding. The user can opt to install them via the command line tool.

Some other minor changes include removing bower.json which is fairly useless in a webpack based project and the addition of es6-promise and isomorphic-fetch as dependencies to the generator and babel as a development dependency.

banderson commented 8 years ago

Wooot. @geekjuice let's grab a coffee tomorrow to talk about this. Specifically around installing NPM dependencies as I've had problems finding the best approach that doesn't break over time. I've resorted to hard versioning a couple of deps (like redux/react in this case) and letting the others fall in line, but I'd love to hear your feedback on how this went!

geekjuice commented 8 years ago

:+1: Cool. Feel free to ping me whenever. Most of these changes are pretty opinionated for what I personally wanted, so we can definitely talk about then

kevinold commented 8 years ago

@banderson @geekjuice Any update from your conversations if this will be merged?

geekjuice commented 8 years ago

@banderson As per our quick discussion, I pinned down the versions for some of the core dependecies. Basically anything related to React or Redux is pinned to the current version as of today (Oct 28, 2015). I ran the generator and the app worked as expected with the only deprecation messages coming from redux-devtools, but seems those will be resolved in the upcoming versions.

Update: There are probably some other things that can be updated such as pinning redux-devtools to the next branch to incorporate the react-v0.14 changes as well as simplifying the .eslintrc to use eslint-config-hubspot or similiar. Those can come later as a separately to prevent adding out-of-scope features on this PR.

banderson commented 8 years ago

:+1: :+1: :+1: here we go, thanks man!