Best way to create Sublime CoffeeCompile equivalent for jetbrain IDEs?
Hi, in short, recently seen a CoffeeCompile plugin for sublime text editor in action. Loved how it allows to select some coffeescript code and using a shortcut to see to what javascript will be compiled out of it.
And in short I need advice or help with making something like that for PyCharm.
More details.
Here is python code for that plugin
https://github.com/surjikal/sublime-coffee-compile/blob/master/coffee_compile.py
So it takes selected text, starts coffeescript compiler as a sub process with stdin on and just write selected text in to that process, after which reads output and you see it in a new window or something.
Coffescript compiler has –eval option that allows to compile one coffescript line like that:
coffee -bpe "alert 'hello world'"
Sadly I did not find a way to exploit that one because of one line limitation and some other problems
Then there is –stdio argument which is actually used in that Sublime plugin, and it seems to me to be a more correct way, I just am not sure from where to start with running coffee in –stdio mode and sending selected text in to it, and then outputting result in to console.
And in short I need advice or help with making something like that for PyCharm.
More details.
Here is python code for that plugin
https://github.com/surjikal/sublime-coffee-compile/blob/master/coffee_compile.py
So it takes selected text, starts coffeescript compiler as a sub process with stdin on and just write selected text in to that process, after which reads output and you see it in a new window or something.
Coffescript compiler has –eval option that allows to compile one coffescript line like that:
coffee -bpe "alert 'hello world'"
Sadly I did not find a way to exploit that one because of one line limitation and some other problems
Then there is –stdio argument which is actually used in that Sublime plugin, and it seems to me to be a more correct way, I just am not sure from where to start with running coffee in –stdio mode and sending selected text in to it, and then outputting result in to console.
请先登录再写评论。
Currently I am ending up with copying selected lines by hand to other file to see only them compiled when I need this, which is far from perfect.
Seems I will need to explore how to make plugins for PyCharm to achieve that.