Pages

You can add dedicated custom code to a workspace by deploying the site's custom code to the workspace instead of production. The workspace preview mode will use this code instead of the current custom code in the site's main (production) custom script. If a workspace does not have its own custom code, preview mode defaults to the production custom code. For more information about custom code and the custom script, see Technical overview.

Only Frosmo developers can add custom code to a workspace.

If a workspace has its own custom code, you can view the code on the workspace main page, in the Custom code section. The section also shows the production custom code to the left of the workspace code, so that you can compare their differences line-by-line.

Production custom code (left) and workspace custom code (right)

Figure: Production custom code (left) and workspace custom code (right)

If you're a Frosmo developer, to deploy a site's custom code to a workspace, run one of the following custom script build commands:

  • PCT 1.0 and 1.5:
    • Development: rake customscript:deploy CUSTOMER=<customer_directory> WS=<workspace_id>
    • Production: rake customscript:deploy CUSTOMER=<customer_directory> ENVIRONMENT=production WS=<workspace_id>
  • PCT 2.0: npm run deploy:<dev|prod> <customer_directory|all> ws=<workspace_id> [debug=true]