Created
May 5, 2011 22:36
-
-
Save omni5cience/958121 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>beforeRunningCommand</key> | |
<string>saveActiveFile</string> | |
<key>command</key> | |
<string># This uses the cli for the less compiler | |
# it should work with either the node module or the ruby gem (which is really old) | |
# Fucking Textmate doesn't seem to like TM_PATH | |
less="${TM_PATH:-$TM_SELECTED_FILE}" | |
css="${less%.less}.css" | |
# Here's where the magic happens | |
lessc "$less" > "$css" | |
echo "lessc $less > $css" | |
echo "Done"</string> | |
<key>input</key> | |
<string>document</string> | |
<key>keyEquivalent</key> | |
<string>@s</string> | |
<key>name</key> | |
<string>Save to CSS (sh)</string> | |
<key>output</key> | |
<string>showAsTooltip</string> | |
<key>scope</key> | |
<string>source.css.less</string> | |
<key>uuid</key> | |
<string>9F9EEC0F-8976-41A0-A541-B5FA04A04E17</string> | |
</dict> | |
</plist> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If anybody stumbles onto this and wonders why I wrote it (rather than just use the existing bundle, which I've actually contributed to), it's because Textmate wasn't finding the less node module.
Since I'm stupid, I did this rather than solve the real problem.