A Cumulocity hybrid "kitchen sink" app for showcasing the following:
- extending default app (i.e. Cockpit).
- creating a custom widget in Angular and using it side-by-side with existing widgets.
- reusing some Cumulocity services and components from AJS (AngularJS) realm by upgrading.
- applying custom branding.
- adding and loading custom language translations.
- setting up unit testing infrastructure.
Good guy Glenn: to venture to the virtue - you don't need a reason to help Earthlings. Just do something good, expect nothing in return. Rely on serendipity.
Bad guy Glenn: to kill my daily productivity killers as a programmer:
- corporate crap meetings,
- corporate crap emails,
- corporate crap interruptions,
- corporate crap customer calls,
- corporate crap support duties,
- corporate crap underqualified/not-willing-to-learn/annoying Earthlings,
- and other corporate craps in between.
What a jerk, you say? Yes, I'm being a jerk here. ¬‿¬
-
Make sure you have Node.js LTS installed and npm from its website, or better even, use nvm.
-
Install yarn.
-
Clone the repo,
cd
to your project directory. -
Install dependencies:
$ yarn install:clean
- Adjust
@c8y/*
packages released (UI build) version you want to develop against:
$ yarn use-c8y <@c8y_packages_version>
e.g.
$ yarn use-c8y 1005.1.0
-
Read. The source.
- Extending Cockpit: index.ts, ng1.ts.
- Creating custom widget: hello-widget.
- Reusing/upgrading AJS services and components: ajs, sink.
- Applying custom branding: branding, assets, package.json.
- Adding and loading locales: locales, c8ycli-extra-webpack.config.js, package.json.
- Setting up testing infrastructure: jest.config.js, testing.
-
Start your development server:
$ yarn start -u <your_tenant_url>
- Find the running hybrid kitchen sink (extended Cockpit) app at: http://localhost:9000/apps/hybridkitchensink/.
$ yarn test
- watch mode:
$ yarn test --watch
- Extract locales (l10n?):
$ yarn extract-locale
- Compile locales (i18n?):
$ yarn compile-locale
Output folder: src/locales
.
$ yarn build
- interactive:
$ yarn deploy
- non-interactive:
$ yarn deploy -u <your_tenant_url> -T <your_tenant> -U <your_username> -P <your_username_password>
- 🏞️ Integrate "ng1" unit testing infrastructure for legacy plugins (tremendously windy road ahead).
Glenn Dwiyatcita (@dwiyatci)
MIT.
See LICENSE.txt.