1 | # @c8y/apps
|
2 |
|
3 | The application package (`@c8y/apps`) provides example applications for the Web SDK.
|
4 |
|
5 | ## Getting started
|
6 |
|
7 | To use the @c8y/apps you need to install the [@c8y/cli](https://www.npmjs.com/package/@c8y/cli). Refer to its documentation for installation instructions.
|
8 | Once installed you can run:
|
9 |
|
10 | ```
|
11 | $ c8ycli new [your-app-name] [example-name]
|
12 | ```
|
13 |
|
14 | For example, to generate the tutorial application with the name `my-app` you need to run:
|
15 |
|
16 | ```
|
17 | $ c8ycli new my-app tutorial
|
18 | ```
|
19 |
|
20 | The `c8ycli new` command can also be provided on its own without the `[name]` and `[template]` options. In this case a few steps will have to be completed via the interface before the app is scaffolded:
|
21 |
|
22 | **Step 1:**
|
23 | ```
|
24 | ? Enter the name of the project: (my-application)
|
25 | ```
|
26 |
|
27 | The first step will ask for the project name. If no project name is entered, the default value `my-application` will be used.
|
28 |
|
29 | > **Info:** This step can also be skipped if the name is provided in the initial command: `c8ycli new my-application`.
|
30 |
|
31 | **Step 2:**
|
32 | ```
|
33 | ? Which base version do you want to scaffold from? (Use arrow keys)
|
34 | > 1010.0.X (latest)
|
35 | > 1011.X.0 (next)
|
36 | > 1011.0.X
|
37 | > 1009.0.X
|
38 | > 1007.0.X
|
39 | > 1006.0.X
|
40 | > other
|
41 | ```
|
42 |
|
43 | In the second step, the base scaffolding version must be selected. The interface will provide the last GA release (latest), the latest available release (next) and four older GA releases. Additionally a version can be manually entered by selecting the `other` option.
|
44 |
|
45 | **Step 2 (other):**
|
46 | ```
|
47 | ? Enter the desired version:
|
48 | ```
|
49 |
|
50 | In this step, the desired version must be entered manually e.g. `1010.0.0`.
|
51 |
|
52 | > **Info:** This question will appear only if `other` was selected in the previous step.
|
53 |
|
54 | **Step 3:**
|
55 |
|
56 | ```
|
57 | ? Which base project do you want to scaffold from?
|
58 | administration
|
59 | application
|
60 | cockpit
|
61 | devicemanagement
|
62 | hybrid
|
63 | tutorial
|
64 | widget-plugin
|
65 | ```
|
66 |
|
67 | In the final step, the base project to scaffold from must be selected.
|
68 |
|
69 | > **Info:** This step will only show projects which are available for the selected version in Step 2.
|
70 |
|
71 | ## Included applications
|
72 |
|
73 | The following table provides an overview on the currently supported applications:
|
74 |
|
75 | | Name | Description |
|
76 | | ---- | --- |
|
77 | |`application`| An empty application to quickly bootstrap new applications. It is the default application and used if you don't specify an `[example-name]`.|
|
78 | |`hybrid`| Also an empty application but running in hybrid mode. That means it can import angularjs plugins and therefore can be used for migration purpose. |
|
79 | |`tutorial`| An application that already assembles most of the concepts of the [@c8y/ngx-components](https://www.npmjs.com/package/@c8y/ngx-components). Use this to get real code examples. |
|
80 | |`widget-plugin`| An Module Federation plugin that can be used to create your own custom widgets. |
|
81 | |`cockpit`| The [Cockpit](http://www.cumulocity.com/guides/users-guide/cockpit/) default application. Use this to extend the existing Cockpit application. |
|
82 | |`devicemanagement`| The [Devicemanagement](http://www.cumulocity.com/guides/users-guide/devicemanagement/) default application. Use this to extend the existing Device Management application. |
|
83 | |`administration`| The [Administration](http://www.cumulocity.com/guides/users-guide/administration/) default application. Use this to extend the existing Administration application. |
|