Sync bundle with TextMate repo

This commit is contained in:
Tom Robinson committed 2009-09-07 18:53:59 -07:00
1 parent 98e18340b7
commit f7c00df9a9
28 files changed
+1178 -18

No files matched your search

@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>
[[ ! -z $TM_OBJJ_MASTER_FILE ]] &amp;&amp; INDEXFILE="$TM_OBJJ_MASTER_FILE"
[[ ! -z $TM_PROJECT_DIRECTORY ]] &amp;&amp; INDEXFILE="$TM_PROJECT_DIRECTORY/index.html"
[[ ! -z $TM_DIRECTORY ]] &amp;&amp; INDEXFILE="$TM_DIRECTORY/index.html"
if [ -z "$INDEXFILE" ]; then
D=`dirname "$TM_FILEPATH"`
while [ -z `find "$D" -name index.html` ]; do
D=`dirname "$D"`
done
INDEXFILE="${D}/index.html"
fi
[[ -z $INDEXFILE ]] &amp;&amp; echo "No start file found. Please set the shell variable 'OBJJ_MASTER_FILE'" &amp;&amp; exit 206
cat &lt;&lt;-HTML
&lt;script type="text/javascript" charset="utf-8"&gt;
try {
if (TextMate.system("", function (task) { })) {
var __TM_confirm_Status;
alert = function(s){TextMate.system("\"$DIALOG\" -e -p '{messageTitle=\"JavaScript\";informativeText=\""+s.toString().replace(/\x27/g,"’").replace(/\"/g,'\\\"')+"\";}'",null);};
confirm = function(s){TextMate.system("\"$DIALOG\" -e -p '{messageTitle=\"JavaScript\";informativeText=\""+s.toString().replace(/\x27/g,"’").replace(/\"/g,'\\\"')+"\";buttonTitles=(\"OK\",\"Cancel\");}'",null).onreadoutput=function(s){__TM_confirm_Status = s != 1;};return(__TM_confirm_Status)};
}
} catch(e) {}
&lt;/script&gt;
&lt;base href="file://${INDEXFILE// /%20}"&gt;
HTML
cat "$INDEXFILE"
[[ ! -z $(grep 'objj_exception_setOutputStream' "$INDEXFILE") ]] &amp;&amp; exit 205
cat &lt;&lt;-JS
&lt;script type="text/javascript" charset="utf-8"&gt;
objj_exception_setOutputStream(function(aString) { console.log(aString);alert(aString) });
&lt;/script&gt;
JS
exit 205
</string>
<key>input</key>
<string>none</string>
<key>keyEquivalent</key>
<string>@r</string>
<key>name</key>
<string>Run</string>
<key>output</key>
<string>showAsTooltip</string>
<key>scope</key>
<string>source.js.objj</string>
<key>uuid</key>
<string>0C55A19B-3B2D-418F-B7FD-7E64B736F379</string>
</dict>
</plist>