mattkrick / redux-optimistic-ui

a reducer enhancer to enable type-agnostic optimistic updates
MIT License
693 stars 36 forks source link

Provide a distribution build in the `dist` directory of the NPM package #38

Closed marcins closed 7 years ago

marcins commented 7 years ago

I work on a codebase that for legacy reasons currently allows us to only consume npm modules that include a UMD dist. Providing a UMD build in dist is pretty common with the rest of the React/Redux ecosystem.

This change adds an additional step to build a browserified UMD bundle in dist/redux-optimistic-ui.js and run Uglify across it to produce dist/redux-optimistic-ui.min.js.

In addition I have also renamed the prepublish step prepare (as per the npm5 deprecation warning), and committed the package-lock.json. In addition I updated the Travis config to run against supported Node version (4, 6 and 8) instead of 4, 5 and 6. If you don't think these changes should be made in this PR let me know and I'll revert them.

mattkrick commented 7 years ago

i prefer yarn over npm 5 & i'd propose using the yarn lockfile (and updating the installation instruction) instead of an npm lockfile. any strong opinions?

marcins commented 7 years ago

Nope, I'm happy to change it over to use Yarn instead. We can provide both installation instructions. The lockfile is really only relevant for contributors (especially since we don't have any dependencies), so as long as we're happy with Yarn then that's fine.

While I've got you, any feels about Prettier for consistent source formatting? (I'd definitely do that in a separate PR though)

marcins commented 7 years ago

I've also added a CHANGELOG using the format on http://keepachangelog.com/en/1.0.0/

I pushed some additional tags in order to support the changelog (I didn't bother with pre 1.0.0 releases, but tagged all the ones since)

mattkrick commented 7 years ago

wonderful! i'll push a new minor version shortly

mattkrick commented 7 years ago

very minor question -- in the changelog, i see eg version 3.0.0 compares 2.1.0 to the HEAD. shouldn't it compare 2.1.0 to 3.0.0? this may be on me if i was tagging it incorrectly

marcins commented 7 years ago

Oops, copy-pasta error. I'll cleanup the CHANGELOG using the GitHub editor now.