Frontend Developer Manual / Version 2207
Table Of Contents
All CoreMedia themes provide a theme-importer
script providing commands, which may be helpful only when
using a remote Content Application Engine. All commands utilize a REST service co-located with Studio. It may be run by executing the
command pnpm run theme-importer [command]
from your theme directory. The following commands are available.
pnpm theme-importer login [options]
This command authenticates a Studio user who is member of the group development
, requests an API key creates an apikey.txt
file containing
the API key as well as an env.json
file containing the URLs of Studio and optionally of preview
and proxy in the config directory of the Frontend Workspace. If the file env.json
is already
existing, it is only being updated.
The API key expires after one day by default. CoreMedia on-premise platform
customers may customize the expiration time in the application.properties
of the Studio web application.
The following options may be passed via the command line.
Parameter | Required | Description |
---|---|---|
--studioUrl
| The URL of Studio. | |
--username, -u
|
A user who is member of the group development
| |
--password, -p
| The password of the user. | |
--previewUrl
| The URL of the Studio preview. | |
--proxyUrl
| The URL of the proxy server. |
Table 6.64. Command-line options for the login command
If required options are not passed as command-line options, they will be prompted for. This way the command may be run without providing any command-line options. The options will all be inquired.
pnpm theme-importer logout
This command performs a logout of the user and removes the apikey.txt
file.
pnpm theme-importer whoami
This command outputs information about the logged in user.
pnpm theme-importer upload-theme
This command builds the theme and uploads it to the remote Content Application Engine. All files of the theme in the home directory of the logged in developer are being cleared and replaced by the files contained in the recently uploaded theme zip.
If the user is not logged in when running this command, he will be forwarded to the login command.