As part of the Koobiq design system, a set of schematics is provided — CLI tools designed to automate library installation, perform migrations, and update components in Angular projects.
Installs the @koobiq/components library and adds all necessary dependencies.
When to use: When adding the library to a project for the first time.
ng add @koobiq/componentsUpdates icon prefixes and names required to migrate from version 7.2.x and below to version 8.0.2 and above.
When to use: After upgrading the @koobiq/icons library to version 8.0.2 or later.
ng generate @koobiq/components:new-icons-packUpdates deprecated CSS selectors (typography and color naming) according to the new design system conventions.
When to use: After upgrading the @koobiq/components library to version 18.6.0 or later.
ng generate @koobiq/components:css-selectorsMoves icons off the deprecated pt-icons font to kbq and renames the deprecated icons.
When to use: while the project still has pt-icons classes (class="pt-icons pt-icons-<name>").
ng generate @koobiq/components:deprecated-iconsUpdates size attribute names and values for the Empty state component in both HTML and TypeScript templates.
When to use: After upgrading the @koobiq/components library to version 18.22.0 or later.
ng generate @koobiq/components:empty-state-size-attrUpdates size attribute names and values for the Overlay component in both HTML and TypeScript templates.
When to use: After upgrading the @koobiq/components library to version 18.22.0 or later.
ng generate @koobiq/components:loader-overlay-size-attrReplaces icon names with new ones.
When to use: after updating the @koobiq/icons library version to 11.0.0 and higher.
ng generate @koobiq/components:icons-replacementThe three icon schematics are not run by ng update; run the ones that match the project yourself, in this order: icons-replacement renames the names the other two produce, so it goes last.
| Order | Schematic | Run it when the project has |
|---|---|---|
| 1 | new-icons-pack | @koobiq/icons below 8.0.2: the mc prefix (mc-<name>, kbq-icon="mc-<name>") |
| 2 | deprecated-icons | pt-icons classes (class="pt-icons pt-icons-<name>") |
| 3 | icons-replacement | @koobiq/icons below 11.0.0 |
Each of them only reports what it finds until it is run with --fix=true, and each logs which icon mapping it uses. Common options:
--project — a project name or a folder such as ./libs; without it the whole workspace is migrated. node_modules and dist are always skipped.--custom-data-path (new-icons-pack, icons-replacement) — a JSON file with your own icon mapping, resolved from the workspace root: [{ "replace": "kbq-add-to-list_16", "replaceWith": "kbq-file-plus-o_16" }]. Without it the built-in mapping is used.ng generate @koobiq/components:new-icons-pack --project ./libs
ng generate @koobiq/components:new-icons-pack --project ./libs --fix=trueng versionng generate command:ng generate "@koobiq/components:<schematic-name>"schema.json file inside the corresponding schematic folder.