Using the SDK

The SDK contains a number of tools for the purpose of building Tommy addons.

Using the Emulator

The core of the SDK is an emulator which emulates the Tommy app environment on your local machine. This lets you develop addons for Tommy that will integrate seamlessly with the live app when you package and release them.

If you followed the installation steps you will see the emulator, which is the main SDK interface, loaded in your browser.

The emulator lets you preview addons that you are building in realtime. The source code for addons is located in the /addons folder. The demo addons that are provided with the SDK are a great starting point, and should be used as a reference for building your own addons.

The main emulator view contains two sections:

  • Addons: A list of all the addons loaded from the /addons folder.

  • Views: A list of all the addon views that can be opened. If you click on any view you will be able to see that view emulated inside the browser. If you modify any of the code from the relative addon, then that view will be automatically reloaded and you can see your changes in your browser in real time.

The SDK itself is very straight forward to use, so when you're ready lets move on to an exaplanation of the addon file structure and manifest files.

Dynamic Features

The SDK has some dynamic features that you will want to leverage in order to speed up your development flow:

  • Live Reload: Whenever you edit any addon code the current addon view will be reloaded. You can configure the default addon view to be autoloaded via the Settings page of the interface.

  • JS Compiling: Javascripts located at views/javascripts/**/.js will be auto compiled into views/build/bundle.js in realtime. ES6 code is fully supported. See the Tasks addon source for an example.

  • SASS Compiling: SASS stylesheets located at views/stylesheets/**/.scss will be auto compiled into views/build/bundle.css in realtime. Only SASS is supported at this time. See the Tasks addon source for an example.

  • Template Compiling: Template7 templates located at views/templates/**/.tpl.html will be auto compiled into views/build/bundle.tpl.html in realtime. See the Tasks addon source for an example.