adobe-webplatform / dropcap.js

Beautiful CSS drop caps made easy
Other
929 stars 70 forks source link

Make it importable in Node #15

Open darobin opened 8 years ago

darobin commented 8 years ago

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 commented 7 years ago

+1

darobin commented 7 years ago

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

steve-king commented 7 years ago

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.