In order to make it easier for users of plugins to install and maintain Movable Type Plugin software, the following best practices have been defined to help developers package and structure their plugins consistently.
- Plugins should be packaged in a file that reflects the version number of the plugin being installed, for example “MyPlugin-1.0.zip”.
PLUGIN_NAME-README.txtfile should be placed in the root of your plugin’s archive that provides adequate documentation on the installation and usage of your plugin.
PLUGIN_NAME-LICENSE.txtfile should be placed in the root of your plugin’s archive that contains the text or a reference to the license associated with your plugin.
- Static files should be placed in:
- Developers are strongly encouraged to not use the “MT” prefix in their plugin names. For example, “Plugin Name” is preferred to “MT-Plugin Name”.
A complete list of Plugin Best Practices can be found on wiki.movabletype.org.
Unix users might be familiar with the program called
make which is a program commonly used to automate the build and compilation process for software. It has been used by Movable Type plugin developers to automate the process of creating tar and zip files for their plugins. Below is a sample Makefile used with the Media Manager plugin:
# Sample Makefile for packaging MT plugins VERSION=2.0 SVN=http://code.sixapart.com/svn/mtplugins/trunk/MediaManager/branches/4.x PACKAGE=MediaManager-$(VERSION) package: svn export $(SVN) $(PACKAGE) tar --exclude="*.svn" --exclude="*~" --exclude="build" --exclude="#*" -zcvf $(PACKAGE).tar.gz $(PACKAGE) zip -r $(PACKAGE).zip $(PACKAGE) -x $(PACKAGE)/build rm -rf MediaManager-$(VERSION) clean: rm -rf MediaManager-$(VERSION) rm -f *~ real-clean: clean rm -f *.tar.gz rm -f *.zip