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 project from Bitbucket https://bitbucket.org/damien1/empty/
Save 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
If it’s going well .. you’ll see this …
Damiens-MacBook-Pro:empty damien$ ant
Total time: 1 second
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
and you’ll see
Damiens-MacBook-Pro:empty damien$ ant make
[delete] Deleting directory /Volumes/Proust/Sites/dev/wp-content/plugins/empty/build
[delete] Deleting directory /Volumes/Proust/Sites/dev/wp-content/plugins/empty/dist
[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
[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
Total time: 0 seconds