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

Add 'main' field in package.json for easier CommonJS loading #47

Merged
merged 1 commit into from
Mar 25, 2015

Conversation

thibaudcolas
Copy link
Contributor

Hi there,

for CommonJS / Browserify users, it is way easier to require modules by their name, rather than by a path. I just added the main field to the project's package.json to achieve this (browserify documentation), and also updated the example in the README.

BTW if you do not want to merge this PR, the current CommonJS example does not work because the path needs to be prefixed by ./ (var ladda = require('./Ladda/dist/ladda.min');).

@smazurov
Copy link

👍 would love to get this fix merged.

hakimel added a commit that referenced this pull request Mar 25, 2015
Add 'main' field in package.json for easier CommonJS loading
@hakimel hakimel merged commit b29179f into hakimel:master Mar 25, 2015
@hakimel
Copy link
Owner

hakimel commented Mar 25, 2015

Thanks!

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.

None yet

3 participants