Glavin001/atom-coffeescript-preview

Possible modularity?

ddavison opened this issue · 9 comments

I'm just imagining some use-cases.. maybe we could modularize this atom plugin to work for any transpiler language.. CoffeeScript, LESS, SASS, etc..?

Absolutely! That is my goal with https://github.com/Glavin001/atom-preview
I hope to use CoffeeScript Preview as a foundation and branch out to easily support many other languages.

Please feel free to create suggested language issues on https://github.com/Glavin001/atom-preview :)

Eventually, I may deprecate CoffeeScript Preview in favour of Atom-Preview. Or I could do something similar to how https://atom.io/packages/linter works.

ah cool.. expect some contributions from me. I assume you already have some legwork done, so i'll await the foundation. If you needed help with that, I could conjure something up

Thanks! How are you liking CoffeeScript Preview? I was thinking of basically copying this code base and making the renderHTMLCode from https://github.com/Glavin001/atom-coffeescript-preview/blob/master/lib/coffeescript-preview-view.coffee#L119-L154 customizable for multiple languages. Should actually be pretty simple! I won't have much time until this next week, and I have not started, so feel free to make a pull request if you're interested :).

As I mentioned to you on Discuss.atom.io, I used to use the Try CoffeeScript ALL THE TIME.. now that it's built in, it's awesome..

I adore tools that i will use often, just like the sublime tabs package - and I will certainly use this one often. I even used it yesterday. The thing that CoffeeScript preview has over Try CoffeeScript, is that it has syntax highlighting! 😎

working on my fork found here I'm on the right track, but i'm also at work so can't really work on it a lot :)

@ddavison, I am back from my weekend vacation now and have access to my laptop. Once you are comfortable, submit a pull request detailing what you have completed. I'd love to see what you have developed so far! I think we can get many languages easily built out and very quickly with this foundation.

for sure! Basically just a modular design similar to what the kinetic package uses. a folder langs/ that it will use, and inside the dir, will contain a file that matches the same grammar. E.g: CoffeeScript.coffee, LESS.coffee which each of these classes will extend from the PreviewView class (though i'm not sure i like that classname 😆)

What i have so far, isn't actually functional. Just a prototype

Unless we wanted to have an extremely modular design like Linter.. where each linter is held within it's own repository, though I think this is overkill for atom-preview