CLI options - godaddy-wordpress/sake GitHub Wiki
Sake will automatically parse CLI options and pass them to tasks. However, this does not include plugin-specific CLI options, such as --bare
for the CoffeeScript plugin. CLI options are designed to be used for lightweight runtime configuration. For example, specifying --minify=false
will skip minifying scripts and styles during the compile
task.
Options are passed around as a property of the sake
object, so any task can look for sake.options
. The deploy task is using it extensively to pass around prompt answers, etc.
Sake has retained most of the CLI options from our Grunt build system, mostly relating to version bumps and the upfw
task.
Global options
minify
- whether to minify styles and scripts during compile/build/deploy - defaults totrue
.skip_pot
- whether to skip compiling the POT file during compile/build/deploy - defaults tofalse
.
Task-specific options
upfw
sake upfw --backwards_compatible=4.4 --minimum_wc_version=2.5.5 --tested_up_to_wc_version=2.7.0 --minimum_wp_version=4.1 --tested_up_to_wp_version=4.6
branch
- the branch to update the plugin framework from, only applicable for FW v4 plugins, defaults tolegacy-v4
skip-composer-update
- whether to skip composer update during the framework update, only applicable to FW v5 plugins, defaults tofalse
- All the
bump:minreqs
options
bump:minreqs
minimum_wc_version
- the minimum required WC versionminimum_wp_version
- the minimum required WP versionminimum_php_version
- the minimum required PHP versiontested_up_to_wc_version
- the "tested up to" WC versiontested_up_to_wp_version
- the "tested up to" WP versionframework_version
- the required framework version, only applicable to FW v4 pluginsbackwards_compatible
- the lowest framework version this plugin is compatible with, only applicable to FW v4 plugins
config
property
- an optional path to the property you want to examine, for example:deploy.production.url
lint:coffee
coffeelint-file
- optional path to a custom coffeelint.json file
lint:js
eslint-configFile
- optional path to a custom .eslintrc file
compress|zip
zipDest
- optional custom ZIP file destination path