Pak Modes

Pak supports the definition of execution modes / profiles. For example: debug, test or release mode. By defining an execution mode, a specific Pak configuration may be easily defined and enabled.

The Pak mode is defined via the pak.mode property. This then selects collections of properties under the pak.modes property. For example: { "pak": { "mode": "debug", "modes": { "debug": { "import": true, }, "release": { "pak": { "import": false, } } } } }

When the mode is set to debug, the properties under pak.modes.debug are logically copied to the top level of the package.json properties. i.e. pak.import is set to true.

Changing Mode

Use the pak mode MODE command to change the execution mode. For example:

pak mode debug

To display the current mode, run: pak mode

Other Applications

Other applications such as Expansive utilize the package.json pak.mode setting and modify their execution mode similarly. The ESP Web Framework also uses the pak.mode setting.

© Embedthis Software, 2003-2015. All rights reserved.