Skip to content

A client code distribution is a packaged collection of files that must be deployed together to implement your custom page functionality. The distribution is uploaded as a ZIP file containing your code and a manifest file.

Every distribution requires a distribution-manifest.json file at the root of the ZIP package that defines the distribution metadata.

PropertyTypeRequiredDescription
nameStringYesDistribution identifier. Must be unique and end with __c
pagesArrayYesArray of Custom Page definitions
pages[].nameStringYesPage identifier. Must be unique and end with __c
pages[].fileStringYesPath to the page's JavaScript file
pages[].exportStringNoExport name. Defaults to "default" if omitted
stylesheetsArrayNoPaths to CSS files to attach to the document
{ "name": "sample_distribution__c", "pages": [ { "name": "hello_world__c", "file": "dist/hello-world.js" }, { "name": "my_page__c", "file": "dist/my-page.js", "export": "mypage" } ], "stylesheets": [ "styles/normalize.css", "styles/styles.css" ] }

This example:

  • Defines a distribution named sample_distribution__c
  • Includes two pages:
    • hello_world__c using the default export
    • my_page__c using a named export mypage
  • Attaches two stylesheets to the document