2.0.0 • Published 1 year ago

@tridion-docs/extensions-cli v2.0.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
1 year ago

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

OptionDescription
Provide id of the addonAddon Id, should be unique, will be used to identify it in the system (string)
Provide name of the addonAddon name, f.i. will be used in manifest.json (string)
Provide description of the addonAddon description, f.i. will be used in manifest.json (string)
Provide author's nameAuthor name, f.i. will be used in manifest.json and package.json files (string)
Provide the name of the frontend extensionExtension 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 extensionExtension 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 DocsUrl to existing Tridion Docs server, all API and UI requests will be proxied to this server. Should be a valid URL (URL)
Extensions to addList of available extension areas that will be added and configured in your project

Header extensions

Adds extra navigation item in the main application header.

OptionDescription
Navigation item idUnique Id for navigation item used by system to identify it (string)
Navigation item titleTitle of navigation item that will be visible on UI
Please provide route to use for your custom pageString that will represent current navigation area in URL
Please provide to which menu item navigation item should be boundId 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 oneIndicates where the navigation item should be located relative to previously selected item (after or before)
React component nameName 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.

OptionDescription
Navigation link idUnique Id for navigation link used by system to identify it (string)
Navigation link titleTitle of navigation link that will be visible on UI
Navigation link tooltipTooltip of navigation link that will be visible on mouse hover
Are you going to use icon for navigation linkIndicate whether you want to put an icon in navigation link
Icon component nameName 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 pageURL of the page that will be used for external page can not contain whitespace and special chars
React component nameName 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.

OptionDescription
Explorer action idUnique Id for action button used by system to identify it(string)
Explorer action titleTitle of the action button
Explorer action tooltipTooltip of explorer action that will be visible on UI
Icon component nameName 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 nameName 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.

OptionDescription
Object Insight idUnique Id for object Insight (string)
Object Insight tooltip:Tooltip of object insight that will be visible on mouse hover
Icon component nameName 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 nameName 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
KeyTypeDescriptionRequired
-i, --inputstringPath to the directory with addon filesYes
-o, --outputstringPath where to output the packageYes
-m, --manifeststringPath to the addon manifest fileNo
-u, --uistringPath to the directory with addon ui filesNo
-a, --assemblystringPath to the the directory with addon assembly filesNo