Dizmo Development Changes for Grace Users


With dizmo development done mostly with Javascript, we have decided to use Javascript for the Build System as well, replacing Grace with dizmoGen. DizmoGen is based on the node.js runtime, and since Grace was based on Python and that meant using another language and installing another runtime.


DizmoGen uses the very popular node.js runtime, together with the npm package manager, which gives access to a rich ecosystem of tools. DizmoGen is based on yeoman and gulp, which are well known and widely used. Apart from pure Javascript, DizmoGen also supports CoffeeScript and TypeScript, two languages which are based on Javascript but with additional features.

Joose and Grace helper functions

We removed the Joose library, which provided a complete class system on top of javascript. If you still want to use Joose, you can download the libary from joose.it and include it via index.html.

We also removed the Grace helper functions libary, which provided a thin abstraction of some dizmo function. We recommend to use dizmoJS API calls directly.

Dependency management

Grace supported the inclusion of files via the //= require statement. dizmoGen doesn’t use those statements, instead you can use the built in dependency management via node modules:

All dizmoGen (sub-)generators support dependency management using node modules: You can structure your dizmo code using require, exports and module.exports objects. Further, you can install external third party libraries and reference them directly with require. For example, to use jQuery run:

npm install --save jquery

Then in your code you can get a reference with:

var $ = require('jquery');

If you want to remove an installed library just run:

npm remove --save jquery

As with Grace, you can also include Javascript libraries in index.html via the <script> tag. The advantage of the using tags to load libraries is, you can refer to non-local libraries, and also to local ones (beneath the /lib folder): In the latter case, the build system only copies the file verbatim from the lib/ to build/ and hence is very fast.


Project configuration

Instead of project.cfg, DizmoGen uses the package.json configuration file that also npm uses. It extends it with a dizmo section for dizmo specific settings.

The build section allows to configure linting and minifying:

"dizmo": {
    "settings": {
      "bundle-identifier": "com.dizmo.my_dizmo",
      "bundle-name": "MyDizmo",
      "category": "",
      "height": 360,
      "width": 480
    "store": {
      "host": "https://store-api.dizmo.com"
    "build": {
      "lint": true,
      "minify": false

similar to the autolint and lintoptions in project.cfg.

The deploy_path option in package.json replaces the deployment_path option in project.cfg. It is by default not part of package.json. Instead its encouraged to put the deploy_path entry into the global configuration in ~/.generator-dizmo/config.json.

Any settings that are specific to the Info.plist file need to be specified in the settings section.

Global configuration file

Grace used the .grace/.grace.cfg for global options. With dizmoGen, you can use .generator-dizmo/config.json file to specify them.

Build scripts

Grace managed the building and deploying of dizmos via the python manage.py <command> command. DizmoGen uses npm run <command> instead. The functionality is similar and the supported commands are clean, deploy, lint, test,
and watch.