Created
September 13, 2014 06:55
-
-
Save manhg/24858dd67a1b850c8c5e 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
// Run after file saved | |
// | |
// Install Sass: sudo gem install sass | |
// Install CoffeeScript: npm install -g coffee-script | |
komodo.assertMacroVersion(3); | |
var koDoc = ko.views.manager.currentView.koDoc; | |
var input = koDoc.file.dirName + '/' + koDoc.file.baseName; | |
var barename = input.substr(0, input.length - koDoc.file.ext.length); | |
switch (koDoc.file.ext) { | |
case '.sass': | |
var output = barename + '.css'; | |
ko.run.runEncodedCommand(window, 'sass --no-cache ' + input + ' ' + output); | |
break; | |
case '.coffee': | |
ko.run.runEncodedCommand(window, 'coffee --map --compile ' + input); | |
break; | |
default: | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment