1.0.3 • Published 3 years ago
wp-deployer v1.0.3
wp-deployer
Deploy WordPress plugin and theme to the wordpress.org plugin directory.
Install
npm install --save-dev wp-deployerSettings
- slug : Plugin or theme slug; Default:
namevalue inpackage.json - username : WordPress repository username; This is required.
- repoType: Repo type;
pluginortheme; Default:plugin - buildDir: The directory where your theme or plugin exists as you want it on the repo. Default:
dist - deployTrunk: Whether to deploy to trunk. This could be set to false to only commit the assets directory. Applies for
pluginonly; Default:true - deployTag: Whether to deploy to trunk. This could be set to false to only commit the assets directory. Applies for
pluginonly; Default:true - deployAssets: Whether to deploy assets. Applies for
pluginonly; Default:false - assetsDir: The directory where your plugins assets are kept; Default:
.wordpress-org - earlierVersion: Last released version. Applies for
themeonly; This is required ifrepoTypeistheme.
Example
Deploy plugin
In package.json:
...
"wpDeployer": {
"username": "yourusername",
"buildDir": "dist"
},
...
"scripts": {
...
"wpdeploy": "wp-deployer"
}Deploy theme
In package.json:
...
"wpDeployer": {
"repoType": "theme", // This is required
"earlierVersion": "1.0.2", // Required; Keep last released version
"username": "yourusername",
"buildDir": "dist"
},
...
"scripts": {
...
"wpdeploy": "wp-deployer"
}