From a61f6d3ebb7e221984438eb0aef4e06423117972 Mon Sep 17 00:00:00 2001 From: Niklas Bergius Date: Mon, 16 May 2011 15:39:55 +0200 Subject: [PATCH 1/2] Now works in e texteditor --- Commands/Compile and Display JS.tmCommand | 50 ++++++++++++----------- Commands/Run selected text.tmCommand | 4 +- Commands/Run.tmCommand | 6 ++- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/Commands/Compile and Display JS.tmCommand b/Commands/Compile and Display JS.tmCommand index 1008981..e569155 100644 --- a/Commands/Compile and Display JS.tmCommand +++ b/Commands/Compile and Display JS.tmCommand @@ -1,26 +1,28 @@ - - + + - - beforeRunningCommand - nop - command - #!/bin/bash - -${TM_COFFEE:=coffee} -scp --bare | pre - fallbackInput - document - input - selection - keyEquivalent - @b - name - Compile and Display JS - output - showAsHTML - scope - source.coffee - uuid - D749F761-1740-4918-9490-90DF376BA72E - + + beforeRunningCommand + nop + command + #!/bin/bash +PATH=/usr/local/bin:/usr/bin:/bin:$PATH +echo '<pre>' +${TM_COFFEE:=coffee} -scp --bare +echo '</pre>' + fallbackInput + document + input + selection + keyEquivalent + @b + name + Compile and Display JS + output + showAsHTML + scope + source.coffee + uuid + D749F761-1740-4918-9490-90DF376BA72E + diff --git a/Commands/Run selected text.tmCommand b/Commands/Run selected text.tmCommand index e1f72fd..bb081f1 100644 --- a/Commands/Run selected text.tmCommand +++ b/Commands/Run selected text.tmCommand @@ -6,8 +6,10 @@ nop command #!/bin/bash - +PATH=/usr/local/bin:/usr/bin:/bin:$PATH +echo '
'
 ${TM_COFFEE:=coffee} -s
+echo '
'
input selection diff --git a/Commands/Run.tmCommand b/Commands/Run.tmCommand index 579f1d2..92a32f9 100644 --- a/Commands/Run.tmCommand +++ b/Commands/Run.tmCommand @@ -6,8 +6,10 @@ nop command #!/bin/bash - -${TM_COFFEE:=coffee} -s | pre +PATH=/usr/local/bin:/usr/bin:/bin:$PATH +echo '
'
+${TM_COFFEE:=coffee} -s
+echo '
' input selection keyEquivalent From 43c933d527428dec975a6cfe7b4a6613a3eaee8d Mon Sep 17 00:00:00 2001 From: Niklas Bergius Date: Fri, 20 May 2011 11:17:57 +0200 Subject: [PATCH 2/2] Compile and Save --- Commands/Compile and Save.tmCommand | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Commands/Compile and Save.tmCommand diff --git a/Commands/Compile and Save.tmCommand b/Commands/Compile and Save.tmCommand new file mode 100644 index 0000000..7372c60 --- /dev/null +++ b/Commands/Compile and Save.tmCommand @@ -0,0 +1,28 @@ + + + + + name + Compile and Save + uuid + 2000D73F-02FB-4EF9-895E-02AFD1FE78B9 + input + none + output + showAsTooltip + command + #!/bin/bash +PATH=/usr/local/bin:/usr/bin:/bin:$PATH +newfile=`echo ${TM_FILEPATH} | sed "s/\.coffee$/.js/"` +${TM_COFFEE:=coffee} -cp --bare ${TM_FILEPATH} > $newfile +echo Coffe `${TM_COFFEE:=coffee} -v` +echo Coffee: "${TM_FILEPATH}" +echo Compiled to: $newfile + beforeRunningCommand + saveActiveFile + scope + source.coffee + keyEquivalent + @^$s + +