-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
AMD / CommonJS support #2
Comments
I think I would have to write a different .js for that, don't I? a simple
wouldn't do it, cause Node doesn't don't support Image class, which is fundamental. From what I've been reading, I would have to import Canvas and then process the image. Am I right? |
Yeah, but to process the ASCII the algorithm uses a Image and a Canvas object (DOM Element) which node doesn't implement. So I would have to rewrite the code as a module, using fs.read to read the image and then process it, generating the ASCII code. It could be done. I'll look in to it. |
@victorqribeiro - by chance could you do this as ESM and then use node-canvas for fallback in non DOM environments or just by default? Would gladly take this as ESM module. |
@MarketingPip Yep, I can look into using node-canvas |
@victorqribeiro - perfect but I ended up doing this myself in the mean time plus adding some more features lol! But! Might as well ship it still. |
Is your feature request related to a problem? Please describe.
This could me imported as an module
Describe the solution you'd like
Add AMD / CommonJS / ES modules support
The text was updated successfully, but these errors were encountered: