Package.json file fixes
nmn opened this issue · comments
Naman Goel commented
There are a number of problems with the package.json file as it stands right now.
- Don't use '*' for version number of dependencies:
Using * or the latest version of all dependencies is a bad idea and can cause problems down the road when the dependencies introduce breaking changes. In order to stay up-to-date, we should provide either ranges of version numbers or the typical '^x.x.x' which follows server and updates to the newest non-breaking version of each dependency. - Mention "main" file:
The package.json file should mention a main file for both npm and node.js to be able to use it easily. Specifically, in case there is a fork down the road between the node.js version and the browser version, it becomes easy to just mention a browser: field to point to a different entry file for browsers via browserify or webpack. - Change Dependencies to DevDependencies:
Most of the dependencies that are mentioned in the package.json file are for development. But they are listed under the list of dependencies. As a result, all these meaningless dependencies are installed when I try to install ForefunnerDB for a project. Putting them under devDependencies, will solve the problem.
Rob Evans commented
Agreed. Added to roadmap for 1.2.8. 👍
Naman Goel commented
Pull Request ready for these changes. Don't know how to attach it to this thread so I'm making it separately.
Naman Goel commented
Something didn't work right. Browserify isn't picking up the correct file even now. I'll try to fix it.
Rob Evans commented
This issue has been fixed.