Skip to content

Instantly share code, notes, and snippets.

@yields
Last active December 12, 2015 02:39
Show Gist options
  • Save yields/4700806 to your computer and use it in GitHub Desktop.
Save yields/4700806 to your computer and use it in GitHub Desktop.
quick plugin for st3 to build components on save.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
import sublime, sublime_plugin
from subprocess import call
import os
class MakeComponents(sublime_plugin.EventListener):
def on_post_save_async(self, view):
win = view.window()
path = win.folders()[0]
cmd = 'make --directory=' + path
json = os.path.exists(path + '/component.json')
json and call(cmd, shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment