@tridion-docs/extensions-cli v2.0.0
Tridion Docs Extensions CLI
Extensions CLI is a command-line application that helps you to create/pack your addon and extensions for Organize Space in Tridion Docs
License
License: https://www.rws.com/legal/terms-and-conditions/rws-technology/
Copyright (c) 2014-2023. All Rights Reserved by RWS Group for and on behalf of its affiliates and subsidiaries.
Compatibility
This version of the package is compatible with Tridion Docs 15.0
Documentation
Getting Started
Note: Using this CLI assumes you have Node.js 18 installed. If you do not, you can install it here.
Create new addon project
Creates new addon and extension project with default server configuration and generated components.
npx @tridion-docs/extensions-cli create
Create options
Option | Description |
---|---|
Provide id of the addon | Addon Id, should be unique, will be used to identify it in the system (string) |
Provide name of the addon | Addon name, f.i. will be used in manifest.json (string) |
Provide description of the addon | Addon description, f.i. will be used in manifest.json (string) |
Provide author's name | Author name, f.i. will be used in manifest.json and package.json files (string) |
Provide the name of the frontend extension | Extension name, will be used in package.json file of the extension and used as identifier of the extension. Extension name should adhere to package.json name requirements. (string) |
Provide description of the extension | Extension description (string) |
Are you going to provide backend assembly? | If you're going to use backend extension you should use this option. (y/n) If 'yes' is chosen, then backend assembly should be listed in manifest.json |
Provide the url to Tridion Docs | Url to existing Tridion Docs server, all API and UI requests will be proxied to this server. Should be a valid URL (URL) |
Extensions to add | List of available extension areas that will be added and configured in your project |
Header extensions
Adds extra navigation item in the main application header.
Option | Description |
---|---|
Navigation item id | Unique Id for navigation item used by system to identify it (string) |
Navigation item title | Title of navigation item that will be visible on UI |
Please provide route to use for your custom page | String that will represent current navigation area in URL |
Please provide to which menu item navigation item should be bound | Id of the navigation item that will be used for positioning. Default navigation items ('content', 'events', 'settings'), also you can previously added custom navigation items id. |
Please choose how navigation item relates to bounded one | Indicates where the navigation item should be located relative to previously selected item (after or before ) |
React component name | Name of the component that will be used in the code. It should be unique and can't contain whitespace or special characters and must start with a capital letter |
Custom link
Adds extra navigation link in the main application header.
Option | Description |
---|---|
Navigation link id | Unique Id for navigation link used by system to identify it (string) |
Navigation link title | Title of navigation link that will be visible on UI |
Navigation link tooltip | Tooltip of navigation link that will be visible on mouse hover |
Are you going to use icon for navigation link | Indicate whether you want to put an icon in navigation link |
Icon component name | Name of the component that will be used in the code. It should be unique and can't contain whitespace or special characters and must start with a capital letter |
Are you going to use a link to external page? | Do you want to put a link that will open an external page |
Provide link to external page | URL of the page that will be used for external page can not contain whitespace and special chars |
React component name | Name of the component that will be used in the code. It should be unique and can't contain whitespace or special characters and must start with a capital letter |
Action extensions
Custom action button that might be used for executing custom logic for selected items.
Option | Description |
---|---|
Explorer action id | Unique Id for action button used by system to identify it(string) |
Explorer action title | Title of the action button |
Explorer action tooltip | Tooltip of explorer action that will be visible on UI |
Icon component name | Name of the component that will be use in the code. It should be unique and can't contain whitespace or special characters and must start with a capital letter |
Hook name | Name of the hook that will be used for this action. Hook name can't contain whitespace or special characters and must start with 'use' followed by a capital letter |
Object Insight extensions
Object right side panel is representing custom data view for one or multiple selected items.
Option | Description |
---|---|
Object Insight id | Unique Id for object Insight (string) |
Object Insight tooltip: | Tooltip of object insight that will be visible on mouse hover |
Icon component name | Name of the component that will be used in the code. It should be unique and can't contain whitespace or special characters and must start with a capital letter |
React component name | Name of the component that will be used in the code. It should be unique and can't contain whitespace or special characters and must start with a capital letter |
Pack your addon
Prepare and pack your project for deployment.
npx @tridion-docs/extensions-cli pack
Key | Type | Description | Required |
---|---|---|---|
-i, --input | string | Path to the directory with addon files | Yes |
-o, --output | string | Path where to output the package | Yes |
-m, --manifest | string | Path to the addon manifest file | No |
-u, --ui | string | Path to the directory with addon ui files | No |
-a, --assembly | string | Path to the the directory with addon assembly files | No |