Created
April 5, 2013 15:55
-
-
Save samuelcotterall/5320424 to your computer and use it in GitHub Desktop.
Sends Compass’ outputted CSS to Transmit’s Docksend
This file contains hidden or 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
# compass-to-docksend.rb (https://gist.github.com/samuelcotterall/5320424) | |
# | |
# Instructions: Put this at the end of config.rb | |
# Execute AppleScript inside Ruby. I stole this from here: http://porkrind.org/missives/calling-applescript-from-ruby/ | |
def osascript(script) | |
system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten | |
end | |
# Send to Transmit | |
on_stylesheet_saved do |filename| | |
osascript <<-END | |
ignoring application responses | |
tell application "Transmit" | |
open POSIX file "#{filename}" | |
end tell | |
end ignoring | |
END | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this instead: https://github.com/NoxArt/SublimeText2-FTPSync