Leon.Radley.se
  • Blog
  • Labs
  • Projects
  • Leon Radley @ Google+
  • Leon Radley @ GitHub
  • Leon Radley @ Twitter
⇤ ⇥
01 Feb 2012
  • sublime-text-2

Sublime Text 2 - YUI Compressor Plugin

Could't find a plugin for using the YUI Compressor so I wrote one.

The plugin calls the yui-compressor jar file, I've used some settings to avoid putting everything on one single line since most text editors grind to a halt when having to deal with long lines.

java
-jar yuicompressor-2.4.7.jar
--charset utf-8
--preserve-semi
--line-break 150
-o ${file_base_name}-min.${file_extension}

Installation

Use package control http://wbond.net/sublime_packages/package_control and search for YUI Compressor

The source code can be found here: https://github.com/leon/YUI-Compressor

Gettings started

Make sure you have java installed, then open a .js or .css file and press F7 or command + b.

The plugin generates a new file along side the original with the extension .min.js or .min.css

Tags

  • play| 3
  • sublime-text-2| 2
  • textmate-2| 1
  • mootools| 1
  • angular| 2
  • akka| 1
  • tip| 1
  • js| 2
  • unix| 2
All content on this site is owned by me, Leon Radley. 2010-2013 ⇪