Skip to content

Commit 3848280

Browse files
docs(examples): upgrade basic-crud-application to Angular v17
Related: #4875
1 parent 9a2a83f commit 3848280

35 files changed

+154
-599
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,17 @@ jobs:
4949
- typescript
5050
- webpack-build
5151
- webpack-build-server
52+
- basic-crud-application/angular-client
5253

5354
steps:
5455
- name: Checkout repository
5556
uses: actions/checkout@v3
56-
57+
5758
- name: Use Node.js 20
5859
uses: actions/setup-node@v3
5960
with:
6061
node-version: 20
61-
62+
6263
- name: Build ${{ matrix.example }}
6364
run: |
6465
cd examples/${{ matrix.example }}

examples/basic-crud-application/angular-client/.browserslistrc

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,42 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
3+
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
7-
# Only exists if Bazel was run
87
/bazel-out
98

10-
# dependencies
9+
# Node
1110
/node_modules
12-
13-
# profiling files
14-
chrome-profiler-events*.json
15-
speed-measure-plugin*.json
11+
npm-debug.log
12+
yarn-error.log
1613

1714
# IDEs and editors
18-
/.idea
15+
.idea/
1916
.project
2017
.classpath
2118
.c9/
2219
*.launch
2320
.settings/
2421
*.sublime-workspace
2522

26-
# IDE - VSCode
23+
# Visual Studio Code
2724
.vscode/*
2825
!.vscode/settings.json
2926
!.vscode/tasks.json
3027
!.vscode/launch.json
3128
!.vscode/extensions.json
3229
.history/*
3330

34-
# misc
35-
/.sass-cache
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
3634
/connect.lock
3735
/coverage
3836
/libpeerconnection.log
39-
npm-debug.log
40-
yarn-error.log
4137
testem.log
4238
/typings
4339

44-
# System Files
40+
# System files
4541
.DS_Store
4642
Thumbs.db

examples/basic-crud-application/angular-client/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
1-
# Angular TodoMVC + Socket.IO
1+
# AngularClient
22

3-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.4.
4-
5-
Inspired from the [TodoMVC](http://todomvc.com/) [angular example](https://github.com/tastejs/todomvc/tree/master/examples/angular2).
6-
7-
![demo](assets/demo.gif)
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.0.2.
84

95
## Development server
106

11-
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.
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
128

139
## Code scaffolding
1410

1511
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`.
1612

1713
## Build
1814

19-
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.
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
2016

2117
## Running unit tests
2218

2319
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
2420

2521
## Running end-to-end tests
2622

27-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
23+
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
2824

2925
## Further help
3026

examples/basic-crud-application/angular-client/angular.json

Lines changed: 34 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -3,26 +3,23 @@
33
"version": 1,
44
"newProjectRoot": "projects",
55
"projects": {
6-
"angular-todomvc": {
6+
"angular-client": {
77
"projectType": "application",
8-
"schematics": {
9-
"@schematics/angular:application": {
10-
"strict": true
11-
}
12-
},
8+
"schematics": {},
139
"root": "",
1410
"sourceRoot": "src",
1511
"prefix": "app",
1612
"architect": {
1713
"build": {
18-
"builder": "@angular-devkit/build-angular:browser",
14+
"builder": "@angular-devkit/build-angular:application",
1915
"options": {
20-
"outputPath": "dist/angular-todomvc",
16+
"outputPath": "dist/angular-client",
2117
"index": "src/index.html",
22-
"main": "src/main.ts",
23-
"polyfills": "src/polyfills.ts",
18+
"browser": "src/main.ts",
19+
"polyfills": [
20+
"zone.js"
21+
],
2422
"tsConfig": "tsconfig.app.json",
25-
"aot": true,
2623
"assets": [
2724
"src/favicon.ico",
2825
"src/assets"
@@ -34,19 +31,6 @@
3431
},
3532
"configurations": {
3633
"production": {
37-
"fileReplacements": [
38-
{
39-
"replace": "src/environments/environment.ts",
40-
"with": "src/environments/environment.prod.ts"
41-
}
42-
],
43-
"optimization": true,
44-
"outputHashing": "all",
45-
"sourceMap": false,
46-
"namedChunks": false,
47-
"extractLicenses": true,
48-
"vendorChunk": false,
49-
"buildOptimizer": true,
5034
"budgets": [
5135
{
5236
"type": "initial",
@@ -58,34 +42,49 @@
5842
"maximumWarning": "2kb",
5943
"maximumError": "4kb"
6044
}
45+
],
46+
"outputHashing": "all"
47+
},
48+
"development": {
49+
"optimization": false,
50+
"extractLicenses": false,
51+
"sourceMap": true,
52+
"fileReplacements": [
53+
{
54+
"replace": "src/environments/environment.ts",
55+
"with": "src/environments/environment.development.ts"
56+
}
6157
]
6258
}
63-
}
59+
},
60+
"defaultConfiguration": "production"
6461
},
6562
"serve": {
6663
"builder": "@angular-devkit/build-angular:dev-server",
67-
"options": {
68-
"browserTarget": "angular-todomvc:build"
69-
},
7064
"configurations": {
7165
"production": {
72-
"browserTarget": "angular-todomvc:build:production"
66+
"buildTarget": "angular-client:build:production"
67+
},
68+
"development": {
69+
"buildTarget": "angular-client:build:development"
7370
}
74-
}
71+
},
72+
"defaultConfiguration": "development"
7573
},
7674
"extract-i18n": {
7775
"builder": "@angular-devkit/build-angular:extract-i18n",
7876
"options": {
79-
"browserTarget": "angular-todomvc:build"
77+
"buildTarget": "angular-client:build"
8078
}
8179
},
8280
"test": {
8381
"builder": "@angular-devkit/build-angular:karma",
8482
"options": {
85-
"main": "src/test.ts",
86-
"polyfills": "src/polyfills.ts",
83+
"polyfills": [
84+
"zone.js",
85+
"zone.js/testing"
86+
],
8787
"tsConfig": "tsconfig.spec.json",
88-
"karmaConfig": "karma.conf.js",
8988
"assets": [
9089
"src/favicon.ico",
9190
"src/assets"
@@ -95,34 +94,8 @@
9594
],
9695
"scripts": []
9796
}
98-
},
99-
"lint": {
100-
"builder": "@angular-devkit/build-angular:tslint",
101-
"options": {
102-
"tsConfig": [
103-
"tsconfig.app.json",
104-
"tsconfig.spec.json",
105-
"e2e/tsconfig.json"
106-
],
107-
"exclude": [
108-
"**/node_modules/**"
109-
]
110-
}
111-
},
112-
"e2e": {
113-
"builder": "@angular-devkit/build-angular:protractor",
114-
"options": {
115-
"protractorConfig": "e2e/protractor.conf.js",
116-
"devServerTarget": "angular-todomvc:serve"
117-
},
118-
"configurations": {
119-
"production": {
120-
"devServerTarget": "angular-todomvc:serve:production"
121-
}
122-
}
12397
}
12498
}
12599
}
126-
},
127-
"defaultProject": "angular-todomvc"
100+
}
128101
}
Binary file not shown.

examples/basic-crud-application/angular-client/e2e/protractor.conf.js

Lines changed: 0 additions & 37 deletions
This file was deleted.

examples/basic-crud-application/angular-client/e2e/src/app.e2e-spec.ts

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/basic-crud-application/angular-client/e2e/src/app.po.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/basic-crud-application/angular-client/e2e/tsconfig.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)