freiksenet / react-calendar

A modular toolkit to build calendar-related things in React
http://freiksenet.github.io/react-calendar/
MIT License
249 stars 46 forks source link

Change `main` of `package.json` to point to `react-calendar.js` #22

Closed andru closed 8 years ago

andru commented 9 years ago

Is there a good use case for the main property of package.json to be set to a file in the dist directory? When working with webpack it's better to have uncompiled modules where possible.

I just hit this an issue with the current value by doing an npm install direct from this repo instead of npm, which errors out because there's no dist dir. Installing direct from a git repo is a valid use case to stay on the bleeding edge rather than wait for npm releases, but right now this is broken (without manually building after every update)

Unless there's any loaders going on which are incompatible with standard node require then setting main to ./react-calendar.js should work great for both node and webpack.

freiksenet commented 9 years ago

This would mean that users of the library would have to transpile this library, I am not 100% sure that's the best way.

There is at least jsx in the code, which would break on standard node require.

Maybe I should push a separate branch to npm that would point to dist and point to ./react-calendar otherwise.

lolJS commented 8 years ago

Closed by #28.