Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

For developers

stoyan edited this page · 4 revisions
Clone this wiki locally

If you want to help the project, here are some more details:

  • The app is built using Mozilla’s XULrunner (like Firefox), so all you need to know is JavaScript, probably some CSS and a bit of XUL. Start here
  • The actual minification is done using JSMin for JavaScript and my port of YUICompressor’s CSSMin for CSS minification
  • Check the todo list

Todos

  • Use YUIcompressor for JavaScript minification
  • Support image optimization – run JPEGtran for JPEGs, GIFsicle for gif animations, and a bunch of PNG tools for PNG. More . For PNG borrow from ScriptPNG
  • When GIFs are converted to PNG and in the same session there’s CSS files for minification, replace the .gif occurrences in the CSS files with .png
  • When minifying images, don’t write a new “-min” file, just overwrite the source file, maybe backup originals in /tmp just in case
  • Better UI – align integers right for example. Also the tree widget looks more appropriate than the list boxes I’m currently using, but I had issues with drag-drop on trees so eventually… well… dropped the tree
  • Better installers – build DMG for Mac and an installer for Windows
  • Build a server-side version – a script you drop in the root of your static components and run after every update. It recursively crawls and minifies all subdirs

How to develop

  • checkout the /src directory
  • the application.ini is the starting point, you need to run XULRunner passing the location to application.ini as an argument. See here
  • Alternatively you don’t need XULRunner, you can use Firefox to run the app. See here
  • Once you know for to execute the code, then you just edit the JavaScript source in your favorite editor and run again. That’s all.

If you’re on Mac and you’ve checkout the project in ~/mystuff/omg you can run the app like:
$ /Library/Frameworks/XUL.framework/xulrunner-bin ~/mystuff/omg/src/application.ini
That’s if you’re using XULRunner. If you simply want to use Firefox, you can do:
$ /Applications/Firefox.app/Contents/MacOS/firefox-bin -app ~/mystuff/omg/src/application.ini

If you’re on Windows or Linux, the paths will be different but the principle is the same.

Note that this is for development, if you want to simply run the app, download the executable package (listed above) and don’t worry about those things.

Packaging for a new release

In addition to /src there’s /pkg. There’s a script build.sh you run and it produces the new zipped packages for distrubution.

There’s only one requirement – you have to copy/paste the XULRunner dependencies in the respective directories:

  • /pkg/linux/omg/xulrunner
  • /pkg/windows/omg/xulrunner
  • /pkg/mac/OMG.app/Contents/Frameworks/XUL.framework/

For more information on distributing an XULRunner app, check here
Download XULRunner from here
Grab the Win, mac ad Linux versions and copy to the appropriate directory under /pkg

Something went wrong with that request. Please try again.