@episerver/content-definitions
v1.1.0
Published
CLI tool for managing content definitions manifest files.
Downloads
451
Readme
Optimizely Content Delivery JavaScript SDK - Content Definitions
SDK and CLI for managing content definitions and modelling of data in an Optimizely application running the Content Definitions API.
Please visit Optimizely World for full documentation of the APIs.
Installing
Using npm:
$ npm install @episerver/content-definitions@latest --save-dev
using yarn:
$ yarn install @episerver/content-definitions@latest --save-dev
Examples
Help:
$ npx content-definitions --help
Usage: cli <command> [options]
Options:
-V, --version Output the version number
-h, --help Display help for command
Commands:
push [options] <path> Push a manifest with content definitions to a management application from the specified path.
pull [options] [path] Pull a manifest with content definitions from a management application to the specified path.
help [command] Display help for command
Push content definitions manifest:
$ npx content-definitions push manifest.json -s https://example.com --allowed-upgrades major --authority https://example.com --client-id xxx --client-secret xxx
Usage: cli push [options] <path>
Push a manifest with content definitions to a management application from the specified path.
Options:
-s, --source <source> URL to the management application.
--authority <authority> Login authority.
--client-id <clientId> Login client ID.
--client-secret <clientSecret> Login client secret.
--allowed-upgrades [allowedUpgrades] Which semantic upgrades of definitions should be allowed. Allowed values are "none", "patch", "minor", and "major".
-f, --force [force] Should the push proceed even though there are warnings or the changes are not allowed.
-h, --help Display help for command
Pull content definitions manifest:
$ npx content-definitions pull manifest.json -s https://example.com --authority https://example.com --client-id xxx --client-secret xxx
Note that path is optional, if left empty the manifest will be displayed in the output instead.
Usage: cli pull [options] [path]
Pull a manifest with content definitions from a management application to the specified path.
Options:
-s, --source <source> URL to the management application.
--authority <authority> Login authority.
--client-id <clientId> Login client ID.
--client-secret <clientSecret> Login client secret.
-h, --help Display help for command