Skip to content

Commit cff92ad

Browse files
author
Johnatan Dias
committed
Add to-do app and its features
1 parent d2b5a0d commit cff92ad

42 files changed

Lines changed: 8000 additions & 54 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# compiled output
44
/dist
5+
/build
56
/tmp
67
/out-tsc
78
# Only exists if Bazel was run

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"files.associations": {
3+
"*.webapp": "json",
4+
},
5+
}

.vscode/tasks.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Developer mode (Watch)",
6+
"type": "npm",
7+
"script": "start",
8+
"problemMatcher": [],
9+
"presentation": {
10+
"reveal": "silent",
11+
"panel": "dedicated"
12+
},
13+
"group": {
14+
"kind": "build",
15+
"isDefault": true
16+
}
17+
},
18+
{
19+
"label": "Build app",
20+
"type": "npm",
21+
"script": "build",
22+
"problemMatcher": [],
23+
"presentation": {
24+
"reveal": "silent",
25+
"panel": "dedicated"
26+
}
27+
},
28+
{
29+
"label": "Install app",
30+
"type": "npm",
31+
"script": "app:install",
32+
"problemMatcher": [],
33+
"presentation": {
34+
"reveal": "silent",
35+
"panel": "dedicated"
36+
}
37+
},
38+
{
39+
"label": "Uninstall app",
40+
"type": "npm",
41+
"script": "app:uninstall",
42+
"problemMatcher": [],
43+
"presentation": {
44+
"reveal": "silent",
45+
"panel": "dedicated"
46+
}
47+
},
48+
{
49+
"label": "Update app",
50+
"type": "npm",
51+
"script": "app:update",
52+
"problemMatcher": [],
53+
"presentation": {
54+
"reveal": "silent",
55+
"panel": "dedicated"
56+
}
57+
},
58+
{
59+
"label": "Start app",
60+
"type": "npm",
61+
"script": "app:start",
62+
"problemMatcher": [],
63+
"presentation": {
64+
"reveal": "silent",
65+
"panel": "dedicated"
66+
}
67+
},
68+
{
69+
"label": "Stop app",
70+
"type": "npm",
71+
"script": "app:stop",
72+
"problemMatcher": [],
73+
"presentation": {
74+
"reveal": "silent",
75+
"panel": "dedicated"
76+
}
77+
}
78+
]
79+
}

README.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
1-
# MyFirstAngularAppKaios
1+
# Sample Angular app for KaiOS
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.1.0.
3+
Simple example of a to-do list, for more information see [KaiOS Developer Portal](https://developer.kaiostech.com/getting-started/build-your-first-app/sample-code#angular)
44

5-
## Development server
5+
![](./docs/to-do-on-input.png)
6+
![](./docs/to-do.png)
67

7-
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8+
In portrait devices
89

9-
## Code scaffolding
10+
![](./docs/to-do-portrait.gif)
1011

11-
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
In landscape devices
1213

13-
## Build
14+
![](./docs/to-do-landscape.gif)
1415

15-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
16+
## Start
1617

17-
## Running unit tests
18+
```console
19+
npm run start
20+
# or
21+
yarn start
22+
```
1823

19-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
24+
## Build app
2025

21-
## Running end-to-end tests
26+
```console
27+
npm run build
28+
# or
29+
yarn build
30+
```
2231

23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
32+
## Send the app to a KaiOS device
2433

25-
## Further help
26-
27-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
34+
```console
35+
npm run app:install
36+
# or
37+
yarn app:install
38+
```

angular.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16-
"outputPath": "dist/my-first-angular-app-kaios",
16+
"outputPath": "build",
1717
"index": "src/index.html",
1818
"main": "src/main.ts",
1919
"polyfills": "src/polyfills.ts",
2020
"tsConfig": "tsconfig.app.json",
2121
"aot": false,
2222
"assets": [
23-
"src/favicon.ico",
23+
"src/manifest.webapp",
2424
"src/assets"
2525
],
2626
"styles": [
@@ -115,6 +115,7 @@
115115
}
116116
}
117117
}
118-
}},
118+
}
119+
},
119120
"defaultProject": "my-first-angular-app-kaios"
120-
}
121+
}

docs/to-do-landscape.gif

31.4 KB
Loading

docs/to-do-on-input.png

12.5 KB
Loading

docs/to-do-portrait.gif

39.4 KB
Loading

docs/to-do.png

12.7 KB
Loading

package.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
{
22
"name": "my-first-angular-app-kaios",
3-
"version": "0.0.0",
3+
"version": "1.0.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
7-
"build": "ng build",
7+
"build": "ng build --prod",
88
"test": "ng test",
99
"lint": "ng lint",
10-
"e2e": "ng e2e"
10+
"e2e": "ng e2e",
11+
"app:install": "kdeploy build install",
12+
"app:uninstall": "kdeploy build uninstall",
13+
"app:update": "kdeploy build update",
14+
"app:start": "kdeploy build start",
15+
"app:stop": "kdeploy build stop"
1116
},
1217
"private": true,
1318
"dependencies": {
@@ -42,6 +47,7 @@
4247
"protractor": "~5.4.0",
4348
"ts-node": "~7.0.0",
4449
"tslint": "~5.15.0",
45-
"typescript": "~3.4.3"
50+
"typescript": "~3.4.3",
51+
"kdeploy": "kaiostech/kdeploy"
4652
}
4753
}

0 commit comments

Comments
 (0)