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 |
| 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 |
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.
npm install [your-package] -w [your-workspace]
ℹ️ [your-package] references to "name" in the package.json
npm run test --workspace=[your-workspace]runs tests for a single pluginnpm run test --workspace=plugins --if-presentruns test for all pluginsnpm run test --workspaces --if-present» run tests for all workspaces (plugins & components)
Dive into a wealth of Cumulocity tutorials and articles in the TECHcommunity Knowledge Base.
Stuck or just curious? Ask the Cumulocity experts directly on our Cumulocity TECHcommunity Forums.
See Cumulocity in action with a Free Trial.
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.
- Cumulocity IoT Web Development Tutorial - Part 1: Start your journey
- How to install a Microfrontend Plugin on a tenant and use it in an app?
- The power of micro frontends – How to dynamically extend Cumulocity IoT Frontends
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.
