pixel-sprite-generator icon indicating copy to clipboard operation
pixel-sprite-generator copied to clipboard

use module.exports to export your module for npm

Open bitplanets opened this issue 10 years ago • 4 comments

bitplanets avatar Dec 22 '14 17:12 bitplanets

I'm a little confused about this. What would you be trying to accomplish with this code running in a non-browser environment?

Without access to the DOM/Canvas context, this code is not very useful. Perhaps I'm missing something :)

zfedoran avatar Jan 26 '15 04:01 zfedoran

I can only think of web-server that provides data to other clients, that are not JS-based. Mobile apps, Flash, etc, without porting the code to different language. Is that super useful?

Zielak avatar Jan 26 '15 13:01 Zielak

Is not to use on the server side, but is to keep the window namespace clean. If I provide a module.export or define, you should export your module to that. Is kind of standard nowadays.

bitplanets avatar Jan 26 '15 23:01 bitplanets

hey i've ported this code to a nodejs environment, it create a .png file : https://github.com/blipn/pixel-sprite-generator-nodejs

blipn avatar Sep 10 '17 09:09 blipn