Initializing a project
Set up an environment to work with Cosmos digital experience (DX) components.
- Open your preferred terminal tool.
- Enter
npx @pega/custom-dx-components@1 init
. - If prompted, enter
y
to install the Custom UI Components package. - Set up the project:
- Enter the name of the project.For example:
mycustomcomponents
- Enter the name of the organization.The organization name forms the first part of the component.
For example:
customorg
- Enter the version number.For example:
1.0.0
- To describe the project, enter a
description.For example:
This project is intended to create and publish a custom component.
- To publish the component to a Git repository,
enter the Git repository URL.For example:
https://git.custom-components.io/custom-cc.git
- To name the project owner, enter an author
name.For example:
Michelle
- Enter the name of the project.
- Check for vulnerabilities by running the
npm audit
command.This will let you know if any vulnerabilities are present. - Remove any vulnerabilities by running the
npm audit fix
command.This will check if new versions of Pega or dependent npms are available, which might fix some or all vulnerabilities.
Previous topic Life cycle of a Cosmos DX component Next topic Creating Cosmos DX components