sources.json

To improve application launch times, use sources.json to load your JavaScript files on demand instead of loading them all when the application launches.

The palm-generate tool creates sources.json for you with the default stage and scene files. As you build your application, add the file paths for each assistant (application, stage, and scene) to sources.json. Do not include any files that are not actually used (for example, the optional app-assistant file). However, if the application includes app-assistant.js, it should always be the first one listed. The scene-assistants must include both the JavaScript and scene names; HTML templates do not need to be included.

The specified format for sources.json is as follows:

Example

[
  {
      "source": "app/assistants/app-assistant.js"
  },
  {
      "source": "app/assistants/stage-assistant.js"
  },
  {
      "source": "app/assistants/first-assistant.js",
      "scenes": "first"
  }
  {
      "source": "app/assistants/second-assistant.js",
      "scenes": "second"
  }
]