Last active
December 14, 2015 06:49
-
-
Save mduvall/5045753 to your computer and use it in GitHub Desktop.
Sublime thing for grunting on save
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
import sublime, sublime_plugin | |
import os | |
import tempfile | |
class HandlebarsOnSave(sublime_plugin.EventListener): | |
def on_post_save(self, view): | |
folder_name, file_name = os.path.split(view.file_name()) | |
extension = file_name[-3:] | |
if extension == 'hbs': | |
view.window().run_command('exec', { 'cmd': 'export PATH=/usr/local/bin:$PATH; /usr/local/share/npm/bin/grunt', 'shell': True, 'quiet': True}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment