Specify Options for All Tasks

You can use a generic vb settings object to specify the configuration options that will be applied to all vb- tasks (for example, vb-build).

If you define the vb options, you don't need to pass any Grunt command line parameters, but can simply run grunt vb-build.

To specify task options for all tasks in Gruntfile.js:

  1. Open Gruntfile.js.
  2. Enter the options for the task.

    Options defined in a vb object are implemented by all vb- tasks. For example, to specify the URL, credentials and id and version options that all the build tasks will use, your Gruntfile.js might be similar to the following:

    module.exports = (grunt) => {
      grunt.initConfig({
       'vb': {
           options: {
               url: 'instance URL',
               username: 'instance username',
               id: 'myVisualApp',
               ver: 1.0
           },
       },
        require('load-grunt-tasks')(grunt);
    };