A Cumulocity base custom hybrid app "trait" for constructing custom hybrid apps with modular patterns and fundamental hooks usage.
After all is really said and done: make less effort to answer repeated questions. Care less about that "pebbles and sands" bombardment. Come to the office later, go home sooner. Travel places, give more meaning to life, fill my obituary with the values that truly matter.
-
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
-
Create new or drop existing (legacy) AngularJS plugins under
src/ajs-plugins
directory. Adjustsrc/index.ts
to import those plugins into the realm of Angular. -
Add Angular feature modules under
src/app
directory (some example feature modules have been done:HelloModule
,LazyModule
). Follow the Style Guide, Old Sport! -
To extend/adapt one of the default applications (i.e. Administration, Device management, or Cockpit), find the "ng1 imports" of the app under
node_modules/@c8y/apps/{administration,devicemanagement,cockpit}/ng1.ts
, and adjustsrc/ng1.ts
andsrc/app.module.ts
accordingly. -
Start your development server:
$ yarn start -u <your_tenant_url>
- Find the running custom hybrid app at: http://localhost:9000/apps/customhybridapp/.
$ yarn test
$ 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 (extremely windy road ahead).
Glenn Dwiyatcita (@dwiyatci)
MIT.
See LICENSE.txt.