Skip to content

Cumulocity-IoT/cumulocity-ui-toolkit

Repository files navigation

Cumulocity UI Guild Toolkit

Logo of the Cumulocity UI Guild, showing an medival looking shield with the letters "U" and "I"


Local development

Available scripts (via npm run):

script task details
build builds all plugins all npm scripts starting with build:
lint starts linting the entire project individual files/folders can be linted using npm run eslint [path-to-folder/file]
test runs unit tests for all plugins run all test: npm scripts

Tool Scripts

script task details
generate:assets [path-to-assets-folder] generates an assets.ts based off of the contents of the folder and the index.d.ts definitions, to allow easy include of media-files (e.g. images) in components
generate:scripts generates the serve/build/test scripts, per plugin, in the package.json based off of the configuration in the angular.json

Workspaces

Workspace description from the npm workspaces docs:

Workspaces is a generic term that refers to the set of features in the npm cli that provides support for managing multiple packages from your local file system from within a singular top-level, root package.

This set of features makes up for a much more streamlined workflow handling linked packages from the local file system. It automates the linking process as part of npm install and removes the need to manually use npm link in order to add references to packages that should be symlinked into the current node_modules folder.

We also refer to these packages being auto-symlinked during npm install as a single workspace, meaning it's a nested package within the current local file system that is explicitly defined in the package.json workspaces configuration.

Installing Dependencies

npm install [your-package] -w [your-workspace]

ℹ️ [your-package] references to "name" in the package.json

Testing

  • npm run test --workspace=[your-workspace] runs tests for a single plugin
  • npm run test --workspace=plugins --if-present runs test for all plugins
  • npm run test --workspaces --if-present » run tests for all workspaces (plugins & components)

Useful links

📘 Explore the Knowledge Base

Dive into a wealth of Cumulocity tutorials and articles in the TECHcommunity Knowledge Base.

💡 Get Expert Answers

Stuck or just curious? Ask the Cumulocity experts directly on our Cumulocity TECHcommunity Forums.

🚀 Try Cumulocity

See Cumulocity in action with a Free Trial.

✍️ Share Your Feedback

Your input drives our innovation. If you find a bug, please create an issue in the repository. If you’d like to share your ideas or feedback, please post them in our Tech Forums.

More to discover


This widget is provided as-is and without warranty or support. They do not constitute part of the Cumulocity product suite. Users are free to use, fork and modify them, subject to the license agreement. While Cumulocity welcomes contributions, we cannot guarantee to include every contribution in the master project.