state.js
function setOptions(input) {
  if (!isObject(input)) {
    throw new Error('gtm.conf method expects a config object')
  }
  for (const key of ['debug', 'notify', 'parallel', 'strict']) {
    const value = input[key]
    if (typeof value === 'boolean') options[key] = value
    else if (value != null) options[key] = strToBool(value)
  }
  for (const key of ['buildPrefix', 'watchPrefix']) {
    const value = input[key]
    if (typeof value === 'string') {
      const trimmed = value.replace(/\s+/g, '')
      if (trimmed !== '') options[key] = trimmed
    }
  }
  if (isObject(input.groups)) {
    for (const name of Object.keys(input.groups)) {
      const value = input.groups[name]
      if (typeof value === 'function' || Array.isArray(value)) {
        options.groups[name] = value
      } else if (!value) {
        options.groups[name] = null // falsy values disable a group
      }
    }
  }
}
function setOptions(input) {
  if (!isObject(input)) {
    throw new Error('gtm.conf method expects a config object')
  }
  for (const key of ['debug', 'notify', 'parallel', 'strict']) {
    const value = input[key]
    if (typeof value === 'boolean') options[key] = value
    else if (value != null) options[key] = strToBool(value)
  }
  for (const key of ['buildPrefix', 'watchPrefix']) {
    const value = input[key]
    if (typeof value === 'string') {
      const trimmed = value.replace(/\s+/g, '')
      if (trimmed !== '') options[key] = trimmed
    }
  }
  if (isObject(input.groups)) {
    for (const name of Object.keys(input.groups)) {
      const value = input.groups[name]
      if (typeof value === 'function' || Array.isArray(value)) {
        options.groups[name] = value
      } else if (!value) {
        options.groups[name] = null // falsy values disable a group
      }
    }
  }
}
function setOptions ( input ) { if ( ! isObject ( input ) ) { throw new Error ( 'gtm.conf method expects a config object' ) } for ( const key of [ 'debug' , 'notify' , 'parallel' , 'strict' ] ) { const value = input [ key ] if ( typeof value === 'boolean' ) options [ key ] = value else if ( value != null ) options [ key ] = strToBool ( value ) } for ( const key of [ 'buildPrefix' , 'watchPrefix' ] ) { const value = input [ key ] if ( typeof value === 'string' ) { const trimmed = value . replace ( / \s+ / g , '' ) if ( trimmed !== '' ) options [ key ] = trimmed } } if ( isObject ( input . groups ) ) { for ( const name of Object . keys ( input . groups ) ) { const value = input . groups [ name ] if ( typeof value === 'function' || Array . isArray ( value ) ) { options . groups [ name ] = value } else if ( ! value ) { options . groups [ name ] = null // falsy values disable a group } } } }
Override default gulp-task-maker options
@param {object} [input] - options, or undefined to return the current config
@property {string|boolean|number} [input.notify]
@property {string|boolean|number} [input.strict]
@property {object} [input.prefix]
@property {object} [input.groups]
@return {object}
Override default gulp - task - maker options