Script Packaging Tool

This is a really short post to let my readers know about a thing I made to package scripts. I used this to combine all the files for my JS game engine, and figured I’d share it. I’m not a Python dev, so the code is a little stinky (hence why this is just a Gist and why this isn’t on my Software page), but it works really nicely.

Instructions

Create a JSON file. This will be your configuration for what files you want put together, and where you want them saved. The format for the file is this:


{
"files": [
"testFolderA/justAFile.js",
"testFolderB/justAnotherFile.js",
"anotherFile.js"
],
"output": ["fileToOutputTo.js","alsoOutPutToThisFile.js"]
}

The above takes justAFile.js, justAnotherFile.js and anotherFile.js, combines them, and saves them to fileToOutputTo.js and alsoOutPutToThisFile.js.

Why?

I made this to put together releases for my game engine, so that people using it only need to add one script to their project, rather than 7. Why not use an existing tool? I wanted something really really simple, lightweight, and portable. This is that.

The Future

I plan on adding some kind of minification option, better command line arguments, and generally improving the Python code for consistency and error handling.

Leave a Reply

Your email address will not be published. Required fields are marked *