SpaceDev/SpaceBukkitPanel — pull request #27 by connor4312 (2013-11-07 04:33:25+00:00)
Title: Refactored assets into grunt workflow

So, before you say "holy crap 23k changes!" note what I did!

I'm currently being hired to do some theme work for a host on SpaceBukkit. I noticed that your system is currently using quite a few files, to say the least, and few of these are minified. That's a huge blockage that's probably slowing down your panel for a lot of people, and it's just plain bad practice to use full, uncompressed source in production.

What I did was set up a Grunt build environment. I moved the uncompressed source files to `app\webroot\sources` (hence the 23k changes), and set Grunt to build and minify all CSS and Javascript files from this source directory into the `app/webroot`. This saves nearly a megabyte out of the scripts' size. That's a lot, and definitely a noticable difference in speed and responsiveness!

The only things I really added are Gruntfile.js in the root, package.json in the root, and I modified .gitignore to exclude the NPM dependencies. Due to the way Grunt handles file extensions, I did have to insert a slightly messy workaround in the Gruntfile, but it [builds without issues](http://d.pr/i/5WKY) and places all minified files in the exact same place they were before this addition.

Let me know if you have any questions. Cheers!