Build Your Extension Using Grunt

To build an extension locally, you need to install Node.js and its package manager (npm) on your local system. After Node is installed and you get your sources, you can run Grunt tasks to build the extension.

To build your extension locally:

  1. Open a command-line interface and enter node -v to confirm that version 18.x or later of Node.js is installed and enter npm -v to confirm that NPM is installed.
  2. In the command-line interface, navigate to the folder on your local system containing the package.json and Gruntfile.js files.
  3. Enter npm install to retrieve the node dependencies required to build the extension.
    The install command retrieves the grunt-vb-build NPM package defined in package.json.
  4. Enter the task names in the command-line interface to process the sources and package the extension. The following example shows how you execute these tasks along with some supported parameters:
    # First build extension sources
    ./node_modules/.bin/grunt vb-process-local
    
    # Package the extension sources. This task in turn executes 
    # vb-optimize and vb-manifest
    ./node_modules/.bin/grunt vb-package
    

    To view the full list of supported parameters for each task, see Grunt Tasks to Build Your Visual Application in Building Responsive Applications with Visual Builder Studio.

When these Grunt tasks finish, you can install the resulting packaged extension artifact on your Oracle Cloud Application. To install the extension, you can install the extension archive using REST or deploy the extension archive using the Grunt vb-deploy task.