Reputation: 11803
What is the best CoffeeScript canvas library available? I have found a topic descibing Javascript libraries (like paper.js, fabric.js or kinetic.js) but they are all written in JavasScript and theoretically could be used with CoffeeScript but practically it could be hard.
So is there any advanced canvas library written in "pure" CoffeeScript, or is it suitable and easy to use one of those available for JavaScript?
Upvotes: 1
Views: 449
Reputation: 8545
Actually, using coffeescript with javascript libraries is not hard. The best libraries will always be in javascript, as this is the most compatible format.
Personally, I write in coffeescript, and then include the javascript libraries normally. When I have examples or code snippets in javascript, I convert them at http://js2coffee.org. Theoretically you could convert the libraries over, but there is no need for this.
I keep my coffeescript in a separate folder, and then use a script to easily compile them for testing - on OSX, the script looks something like:
#!/bin/sh
export PATH=/usr/local/bin
export NODE_PATH=usr/local/lib/node_modules
/usr/local/bin/coffee --compile --output ../media/js/ ../coffee/*.coffee
Upvotes: 4