Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package.json file fixes #6

Closed
nmn opened this issue Sep 24, 2014 · 4 comments
Closed

Package.json file fixes #6

nmn opened this issue Sep 24, 2014 · 4 comments

Comments

@nmn
Copy link
Contributor

nmn commented Sep 24, 2014

There are a number of problems with the package.json file as it stands right now.

  1. 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.
  2. 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.
  3. 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.
@Irrelon
Copy link
Owner

Irrelon commented Sep 24, 2014

Agreed. Added to roadmap for 1.2.8. 👍

@nmn
Copy link
Contributor Author

nmn commented Sep 24, 2014

Pull Request ready for these changes. Don't know how to attach it to this thread so I'm making it separately.

@nmn
Copy link
Contributor Author

nmn commented Oct 3, 2014

Something didn't work right. Browserify isn't picking up the correct file even now. I'll try to fix it.

@Irrelon
Copy link
Owner

Irrelon commented Nov 25, 2014

This issue has been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants