Created
November 9, 2012 18:35
-
-
Save defuz/4047400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CompileListener(EventListener): | |
def on_post_save(self, view): | |
if isCoffee(view): | |
view.run_command("compile") | |
js_file = path.splitext(view.file_name())[0] + '.js' | |
for v in view.window().views(): | |
if v.file_name() == js_file: | |
v.run_command("revert") | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment