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

Added main and browser fields for npm installation #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amilajack
Copy link

@amilajack amilajack commented Jun 14, 2016

@kennethcachia This allows the package to be installed with npm directly from github as a dependency. Added this because there is no npm support yet.

This allows the package to be installed with npm directly from github as a dependency. Added this because there is no npm support yet.
@amilajack amilajack changed the title Added main and browser fields Added main and browser fields for npm installation Jun 14, 2016
Copy link

@shri3k shri3k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally approved this earlier but when I tested this in my repo I got some error.
This might need more than just changes in package.json.

I'm thinking something like the following should be added if people are using CJS instead of just AMD.

  if (typeof define === 'function' && define.amd) {
    define(factory);
  } else if (typeof module === 'object' && module.exports) {
    module.exports = root.BackgroundCheck;
  } else {
    root.BackgroundCheck = factory(root);
  }

Any thoughts?

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

Successfully merging this pull request may close these issues.

3 participants