Adds multiple variables to args.vars. Variables can be:

  • textual, numerical and arrays.
  • object variables of the above types.
tasks: [{
handler: 'add-vars',
params: {
vars: {
prop1: 'changes the args.vars.prop1',
'obj1.prop2': 'creates an object obj1 in vars, set prop2',
'over.about.blue': 'creates obj over.about.sets prop blue',
},
}
}]
interface AddVarsTaskParams {
    allowExpr?: boolean;
    overwrite?: boolean;
    vars: {
        [varName: string]:
            | string
            | ExprString
            | number
            | number[];
    };
}

Hierarchy

  • AnyParams
    • AddVarsTaskParams

Properties

allowExpr?: boolean

If true and textual value starts with =, it will compute the expression.

false
overwrite?: boolean

If false, it won't overwrite the previous value.

true
vars: {
    [varName: string]:
        | string
        | ExprString
        | number
        | number[];
}

Object with name: value of all the variables to add to args.vars.