Skip to content

Conversation

@vladimyr
Copy link
Contributor

@vladimyr vladimyr commented May 20, 2019

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 🔧

vladimyr added 2 commits May 21, 2019 00:58
- implementing `options.logging` that defaults to `console.log`;
  updating tests to use `options.logging = false;`
- updating docs
- swapping map + join with single pass reduce
@UFarooqDevelop
Copy link

update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants