Lifecycle

Version 3.x

None yet.


Version 2.x

Lifecycle object is used for publish and activate projects and templates programmatically.

Basic Usage

1
2
3
4
5
6
7
8
9
10
11
12
13
/* globals $ */
/* eslint-env node, dirigible */

var lifecycle = require('platform/lifecycle');
var response = require('net/http/response');

// Publish All Projects
lifecycle.publishAll();

response.println("All projects have been published.");

response.flush();
response.close();

Definition

Functions


Function Description Returns
activateProject(projectName) Activates the project with the given name -
publishProject(projectName) Publishes the project with the given name -
publishTemplate(projectName) Publishes the project with the given name as a Template -
activateAll() Activates all the projects in the userโ€™s workspace -
publishAll() Publishes all the projects in the userโ€™s workspace -

Compatibility

Rhino Nashorn V8
โœ… โœ… โŒ
Edit