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

can't require() #54

Closed
max-mapper opened this issue Mar 17, 2014 · 2 comments
Closed

can't require() #54

max-mapper opened this issue Mar 17, 2014 · 2 comments

Comments

@max-mapper
Copy link

hi, this code doesn't work right now:

var rasterizeHTML = require('rasterizehtml')
var canvas = document.createElement("canvas")
document.body.appendChild(canvas)
rasterizeHTML.drawHTML('Some <span style="color: green">HTML</span>', canvas)

because this package doesn't specify a main field in package.json and also doesn't use the default main of index.js as the main require point for browserify

@cburgmer
Copy link
Owner

Thanks for the report. I'd like to support browserify. I'm a bit hesitant to add a main field for now though as long as the require-able file is a compiled product and not a proper source file (rasterizehtml ships the dist dir). Maybe adding a simple "browser" directive is enough for browserify. I'll check once I'm on a proper device.

@cburgmer
Copy link
Owner

Of course a pull request would be nice too :)

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