Basic Usage

The Workbench makes use of the grunt executable available to you in your Terminal window. You can use this command in a number of ways:

$ grunt init
# => The external resources will be copied into ./dist.

$ grunt
# => The current distribution will be generated into ./dist.

$ grunt doc
# => The documentation will be generated into ./doc.

$ grunt test
# => The distribution will be tested.
dist/ files and folders are cleaned on builds

The contents of dist/ are automatically cleaned when Workbench is built. Files or folders that are not created by grunt init and grunt will be removed. Do not use dist/ as an important location; instead, use it as a staging area and copy files from there to your another working directory.

Workbench also comes with a built-in development server that will allow you to preview what the generated example applications will look like in your browser locally.

$ grunt serve
# => A development server will run at http://localhost:8081/
Be aware of default behavior

As of version 0.0.0, the grunt serve command will watch for changes automatically. However, you will need to reload the application in your browser to visually inspect the changes.

These are just a few of the available configuration options. Many configuration options can either be specified on the command line, or alternatively (and more commonly) they can be specified in a config.json file at the root of the distribution directory. Workbench will automatically use the options from this file when run. For example, if you place the following lines in your config.json file:

"staticRoot": "",
"dataRoot": "/data"

Then the web serve root directory is the root workbench distribution directory dist/ and the data root directory is located in dist/data.

For more about the possible configuration options, see the configuration page.