I’m pleased to announce the first release of ASMake, a rare case of an AppleScript script library that is used from the command-line! If you know Ruby’s rake or GNU make, well, ASMake tries to be their little brother. But, since it’s written in pure AppleScript, it may be a better choice to manage AppleScript projects than rake or make (although you can use it for any kind of project, not just AppleScript). Note that ASMake is still in its infancy: while quite a lot of functionality is already there, it has a long way to go. Suggestions and contributions are welcome!
The documentation is available in the README and (at this stage) in the source code, so I won’t repeat it here. The idea is that you have a project and want to automate some tasks, like building, deploying, cleaning files, running tests, or whatever. To do so, you may put a makefile.applescript file in your project’s directory. Such file will contain the definitions of the various tasks. For example, a task to compile all the scripts in your AppleScript project might look like this:
script build
property parent : Task(me)
property description : "Build all AppleScript scripts in this project."
osacompile("*.applescript", "scpt", {"-x"})
end
You may run this task from the command line with
That’s all. ASMake also provides support for command-line arguments and parametrised tasks (see the README). Since tasks are just scripts, the full power of AppleScript is at your disposal, of course. Besides, ASMake defines some helper handlers, like the osacompile() handler shown above, and more will be added in the future.
The script is available from https://github.com/lifepillar/ASMake. Stable releases can be downloaded here: https://github.com/lifepillar/ASMake/releases.
[Edit] Fix URLs