Nicer way to deploy a minified Chrome extension
When deploying an extension I follow various steps : copy to a temporary folder all the files, copy/paste back and forth the code to the on-line minifiers / obfuscators and create the zip to be upload开发者_开发百科ed.
It's obvious that this could be simplified with scripting, but my experience on Windows scripting is very limited (most of my experience is server-side). Do I have to look back to the DOS .bat files like in the 90's or is there some cool tool or method I'm not aware?
Besides something like Ant, PHP is great for CLI scripting, even on Windows. Tons of built-in functions, including .zip creation, and thorough docs.
IMO you'd be better off learning PHP (or Python, or anything else) than batch scripting.
I am using Apache Ant for builds. Maybe an overkill, but you can automate everything - minification (with 3rd party java libs), archiving, automatic license header insertion after minification.
I you are not familiar with Ant (or java) then it will be probably hard to jump right into it.
PS. Here is my open souce extension that uses Ant for builds, you can check it out (it copies files into a build folder, minifies, archives)
精彩评论