Welcome and say hello to empty. empty is a bunch of ANT Build Tasks for WordPress plugin developers that help automate the build thanks to Apache Ant
Why ANT not PHING?
Go ask Google that - there are plenty of conversations elsewhere on ANT vs PHING. It’s really a personal choice.
Ant, Phing, Grunt.js, make are all build tools for developers. Ant is a popular tool, free and widely used. It’s commonly used for Java but can fit in with other code and projects.
Why not Grunt.js?
Well yes, experimentation is good - Grunt.js may fit in there somewhere if ANT tasks for minify aren’t simple.
What’s in empty
empty supports a number of commonly needed task features like
- create a compressed .zip of all your project files
- copy the zip to your DropBox folder
- works with a Mac and Windows
- currently supports 4 dev, test and staging environments
- basic edit / replace by tags of your readme markdown file
- saves your readme.md as readme.txt to the distribution .zip
How to Get started with empty?
Download / fork the projectSave all the files into your WordPress plugin project directory Make sure you have Java and Apache Ant installed š
Start by editing build.properties and enter the name of your plugin.
Then open Terminal or your CLI editor .. and type
ant
If it’s going well .. you’ll see this -
Damiens-MacBook-Pro:empty damien$ ant
Buildfile: /wp-content/plugins/empty/build.xml
BUILD SUCCESSFUL
Total time: 1 second
Damiens-MacBook-Pro:empty damien$
Build your plugin compress .zip
This will ..
- delete the temp build folders
- make the build directories
- copy all the required project files to a new folder
- zip the finished project
Type
ant make
and you’ll see
Damiens-MacBook-Pro:empty damien$ ant make
Buildfile: /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build.xml
build.clean:
[delete] Deleting directory /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build
[delete] Deleting directory /Volumes/Proust/Sites/dev/wp-content/plugins/empty/dist
makedir:
[mkdir] Created dir: /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build
[mkdir] Created dir: /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build/empty
[mkdir] Created dir: /Volumes/Proust/Sites/dev/wp-content/plugins/empty/dist
make:
[copy] Copying 6 files to /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build/empty
[copy] Copying 2 files to /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build/empty/css
[copy] Copied 1 empty directory to 1 empty directory under /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build/empty/js
BUILD SUCCESSFUL
Total time: 0 seconds
Damiens-MacBook-Pro:empty damien$
Tags: Read more from my blog for an introduction and quick tips on developing in Hugo or UCTD.