Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 1.61 KB

README.md

File metadata and controls

63 lines (49 loc) · 1.61 KB

wp-deployer

Deploy WordPress plugin and theme to the wordpress.org plugin directory.

Install

npm install --save-dev wp-deployer

Settings

  • slug : Plugin or theme slug; Default: name value in package.json
  • username : WordPress repository username; This is required.
  • repoType: Repo type; plugin or theme; 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 plugin only; Default: true
  • deployTag: Whether to deploy to trunk. This could be set to false to only commit the assets directory. Applies for plugin only; Default: true
  • deployAssets: Whether to deploy assets. Applies for plugin only; Default: false
  • assetsDir: The directory where your plugins assets are kept; Default: .wordpress-org
  • earlierVersion: Last released version. Applies for theme only; This is required if repoType is theme.

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"
}

Credits