Overview
You can use Grunt to build your application from the sources stored in your Git repository or stored locally. Your visual application includes a Grunt file that you modify to define custom tasks that you want to include in the build process and to configure built-in tasks.
The root folder of your visual application includes two resource files that Grunt uses when building applications:
| File | Description |
|---|---|
Gruntfile.js
|
Contains a basic Grunt script for building the app that can be modified to add custom build tasks, and to configure built-in tasks. |
package.json
|
Declares the dependency and specifies the URL reference to the
grunt-vb-build
NPM package that provides the Grunt tasks used to build and audit visual applications.
VB Studio
automatically updates the package version and URL whenever Oracle publishes a new version of the package.
The |
The build process for an application using Grunt includes the following steps:
| Step | Description |
|---|---|
| Process the application sources |
This step consists of several important processes. The most important is "metadata processing", when the visual application sources are transformed into a deployable form. This includes the injection of Visual Builder runtime links and other configuration into the application's You run the |
| Optimize the processed sources |
This step consists of a number of parts: optimize images, optimize styles, create require module bundles, and, if necessary, deploy the app's resources to a content delivery network. To optimize the processed sources, you run either the The |
| Deploy the application artifact |
This step consists of creating the deployment package archive and deploying it to the Visual Builder runtime instance. You run the |
You can include custom tasks in any of the steps by modifying Gruntfile.js to redefine tasks.