Skip to content

Instantly share code, notes, and snippets.

@2no
Last active December 16, 2015 21:29
Show Gist options
  • Save 2no/5500063 to your computer and use it in GitHub Desktop.
Save 2no/5500063 to your computer and use it in GitHub Desktop.
このスクリプトを AppleScript エディタでアプリケーションとして保存した後、Finder のツールバーにボタンとして置いておく。後は Gruntfile.js があるディレクトリでボタンをクリックすれば自動的にターミナルが立ち上がって grunt コマンドを実行する
tell application "Finder"
set myWin to window 1
set theWin to (quoted form of POSIX path of (target of myWin as alias))
tell application "Terminal"
activate
tell window 1
do script "cd " & theWin & ";grunt"
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment