dropcap.js icon indicating copy to clipboard operation
dropcap.js copied to clipboard

Make it importable in Node

Open darobin opened this issue 9 years ago • 3 comments

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.

darobin avatar Dec 07 '15 23:12 darobin

+1

steve-king avatar Oct 31 '16 12:10 steve-king

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

darobin avatar Oct 31 '16 13:10 darobin

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.

steve-king avatar Oct 31 '16 14:10 steve-king