Once jsmin is installed as a global script it can then be used from the command line like so:
Here I just created a minified version on my development file main.js. As of this writing the size of my main.js dev file is 3.41KB, and the main.min.js file is now 1.16KB only 34% of the original size. After doing this with all of my source files I am at 6KB, and I have my game about half done. As such it looks like this solution is working pretty great for me, and I may not need to result to all those little tricks to crunch things down more (such as the !0 in place of true trick).
I have a few files that I would like to combine together in a single js file that is minified. This is something that would not take that long to do manually, but I have gotten into the habit of throwing together quick little scripts that automate a process like this which can save a little time as a keep developing.
To use jsmin in a script I will want to install it as a dev dependency of my node project.
Once installed I can use it in my node scripts, for the project I have in mind I put this together in a flash.
The script recursively keeps calling itself until all of the files have been opened the js inside minified, and added to a variable that is then written to build.js in the root folder of my project. This as you may gather is the file that I will eventfully be using in my zip file that I will be submitting to the competition.
Be sure to check out my many other posts on node.js and npm packages.
Thats it for now, happy coding.