node-spritesheet icon indicating copy to clipboard operation
node-spritesheet copied to clipboard

extended httpImagePath to be compatible with downsampling if it ends with a /

Open ebiggs opened this issue 12 years ago • 3 comments

I needed to utilize httpImagePath but it wasn't compatible with the downsampling mechanisms since you could only specify one file. I maintained backwards compatibility by checking if the httpImagePath ends with a slash, if it does then append the file name, otherwise just use the httpImagePath

ebiggs avatar Sep 17 '13 20:09 ebiggs

per the npm docs: do not compile coffeescript on install, or use install scripts in general. the man page recommends compiling coffee on prepublish, but checking the compiled coffee into git is better so that the repo can be used as a version in package.json.

ebiggs avatar Sep 18 '13 11:09 ebiggs

@ebiggs this was the case originally, but I removed the JS from the repo as I was getting pull requests that only affected one or other of the CS and JS. Then, thinking about it, it feels a little dirty checking 'compiled' (read 'derived') code into Git, as you wouldn't do this for anything else. I'm torn.

Any ideas how other CS modules handle this issue?

richardbutler avatar Oct 18 '13 08:10 richardbutler

It's tough. The install scripts seemed to work most of the time, but when I added node-spritesheet to a pretty complicated project it failed, and I couldn't figure out why. The description of it as an anti-pattern made me think it's something that's not worth fixing. My limited research showed that at least 1 respectable sizable CS module did the check-in-compiled-js solution. The problem is that this is something that can't really be automated and must be handled by developer guidelines, and then reviewed by you in a pull request. At the very least, perhaps minifying the js would help people realize that the source is coffee?

ebiggs avatar Oct 18 '13 19:10 ebiggs