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

Make it importable in Node #15

Open
darobin opened this issue Dec 7, 2015 · 3 comments
Open

Make it importable in Node #15

darobin opened this issue Dec 7, 2015 · 3 comments

Comments

@darobin
Copy link
Contributor

darobin commented Dec 7, 2015

It would be great if this module were importable in Node. That would allow us to build with it using Browserify in the usual way. Right now we have to sort of hack it in.

The trick would be to detect the presence of export and write to that instead of window. I can cook up a PR if you're up for it.

@steve-king
Copy link

+1

@darobin
Copy link
Contributor Author

darobin commented Oct 31, 2016

@steve-king the issue wasn't closed but AFAIK it now works.

@steve-king
Copy link

Not for me.

When I do var Dropcap = require('dropcap.js') or import Dropcap from 'dropcap.js, Dropcap is an empty object. I still have to use window.Dropcap instead.

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

No branches or pull requests

2 participants