[TxMt] Re: How do I create a new command in a bundle?

Graham Heath graham.p.heath at gmail.com
Sat Apr 18 18:52:20 UTC 2015


With the bundle editor selected, press Command + N.

Sent from my iPhone

> On Apr 18, 2015, at 1:21 PM, jgalt <jgaltusa at gmail.com> wrote:
> 
> I am trying to follow these instructions and I do not understand how to create a new command. Can someone please explain how this is done? 
> 
> https://coderwall.com/p/j7qqsa/minify-your-css-inside-of-textmate
> 
> 
> In your Bundles menu, go to Edit Bundles and select your favorite CSS Bundle (I am personally a huge proponent of mCss <http://minimaldesign.net/downloads/tools/textmate-css-bundle> ). Add a new Command, and enter make the command contents the following code:
> 
> # Create the minified filename
> NEWFILE=${TM_FILENAME%\.css}'.min.css'
> 
> # Minify into that file
> curl -X POST -s --data-urlencode "input@${TM_FILENAME}" \
>     http://www.cssminifier.com/raw > $NEWFILE
> 
> # And open it
> mate $NEWFILE
> 
> 
> You can make your key equivalent anything you'd like, I set mine to Cmd + Shift + R. Once you have done this, give it a whirl. You should see that your styles.css generates a styles.min.css in the same directory, as well as opens it in Textmate.
> 
> To note: if you don't have the Textmate command line utility installed, simply delete the last line of this command to stop seeing errors.
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20150418/8545709d/attachment.html>


More information about the textmate mailing list