ajmath/Syntaxtic

Suggestion: Rewriting extension JS in CoffeeScript

deiga opened this issue · 7 comments

I was toying with the idea of rewriting everything in CS.
Would this be desirable in any way?

I would definitely be up for that. It would be a good excuse for me to learn coffee script. Feel free to tackle this if you want

Only concern I have is shCore.js it's really hard to parse and a huge file anyway. But I guess we can just start with the easier ones :)

For now, how about only rewriting the js files in the base dir (options.js, popup.js, background.js, and toggle_*.js). I want to restructure the other stuff to make a more clean separation between the external libraries and the core extension code. Maybe move to using npm

Sure, that won't even take too long :)

Do you know if the chrome extension API works with coffeescript natively? If not we'll probably need to restructure the build system for creating chrome-friendly extension packages.

No it doesn't, at least not that I know of.
I've been working on Vimium lately and they have the build system setup to produce the needed JS files. We can just copy parts of their implementation

Sounds good.