Compiling customization projects

The custom.json file defines a basic customization configuration. Options provided for the grunt command allow you to override the settings in config.json.

Tip: For simple instructions on compiling a single customization project, see Compile a customization project.

Understand custom.json

The custom.json file defines the customization compilation settings that are applied when you issue a grunt command from within the project directory with no options.
{
  "compile": {
    "mode": "cdev",
    "withStats": false,
    "customization": "customization/default"
  }
}
"mode"
  • "cdev" compiles the selected customization project for development.
  • "prod" compiles the selected customization project for production. This compilation mode combines the customization files into as few files as possible to reduce the size of the delivery to the user agent over the network, and it improves GWC-JS performance by lessening browser cache size. See Customization deliverable.
"withStats"
  • "true" compiles with statistics.
  • "false" compiles without statistics.
"customization"
  • "false" generates deliverables in dist/web. The generated deliverables are the same as those provided in $FGLASDIR/web/gwc-js.
  • "true" generates the default customization in dist/customization/default. It is the same as having "customization": "customization/default".
  • "customization/<customization_project>" generates the specified customization project in dist/customization/<customization_project>.

Override custom.json setting with grunt options

To override the custom.json settings, use these options:

grunt --customization=customization/default will compile customization/default in dist/customization/default.

grunt --customization=customization/<customization_project> will compile customization/<customization_project> in dist/customization/<customization_project>.

grunt --customization=ALL will compile all customization projects in the customization folder, creating the necessary deliverables in dist/customization (one folder per customization project, with the names matching).