This PR introduces optional options param to deployForEnv function changing its signature to:
/**
* Deploy to a single environment
* @param {object} deployConfig object containing deploy configs for all environments
* @param {string} env the name of the environment to deploy to
* @param {array} args custom deploy command-line arguments
* @param {object} [options={}] deploy options
* @param {boolean|function} [options.logging=console.log] logging function or `false` to disable logging
* @param {DeployCallback} cb done callback
* @returns {boolean} return value is always `false`
*/
function deployForEnv(deployConfig, env, args, options, cb) { ... }
(It is an optional param, so there is no fear in breaking existing usage pattern which will simply default to console.log as expected.)
This enables control of logging behavior from outside instead of hardcoding console.log calls 🔧
This PR introduces optional
options
param todeployForEnv
function changing its signature to:(It is an optional param, so there is no fear in breaking existing usage pattern which will simply default to
console.log
as expected.) This enables control of logging behavior from outside instead of hardcodingconsole.log
calls 🔧