Skip to content

Added main and browser fields for npm installation#88

Open
amilajack wants to merge 1 commit intokennethcachia:masterfrom
amilajack:patch-1
Open

Added main and browser fields for npm installation#88
amilajack wants to merge 1 commit intokennethcachia:masterfrom
amilajack:patch-1

Conversation

@amilajack
Copy link
Copy Markdown

@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
Copy Markdown

@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