Skip to content

Commit 817564b

Browse files
committed
Update Angular 14 & add React 18 App
1 parent f018f03 commit 817564b

File tree

458 files changed

+40527
-9063
lines changed

Some content is hidden

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

458 files changed

+40527
-9063
lines changed

README.md

Lines changed: 89 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,43 @@
1-
# Angular 13 Example PWA
1+
# Angular 14 & React 18 Examples PWA
22

3-
> An Angular starter kit featuring [Angular 13.3.0](https://angular.io), [Angular CLI 13.3.0](https://cli.angular.io/)
3+
<table>
4+
<tr>
5+
<td>
6+
<a href="https://www.ganatan.com/en">
7+
<img src="./img/ganatan-about-github.png" align="right"
8+
alt="Ganatan Angular Example routing" width="140" height="140">
9+
</a>
410

5-
> it's part of a repo series designed to create a Progressive Web App with Angular
11+
it's part of a repo series designed
612

7-
# Web Application Live Demo
8-
<p align="center">
9-
<p align="center">
10-
<a href="https://angular.ganatan.com/">
11-
<img src="https://media.giphy.com/media/9BuBBLc7keCgRojp92/giphy.gif" alt="Angular 13 Example
12-
Application"/>
13-
</a>
14-
</p>
15-
</p>
13+
to create a **Web Application with Angular 14**
1614

17-
## Quick start
15+
* Featuring [**Angular 14.0.3**](https://github.com/angular/angular/releases) & [**Angular CLI 14.0.3**](https://github.com/angular/angular-cli/releases/)
16+
17+
18+
* See the [**Live demo**](#angular-live-demo), Test the repo with [**Quick start**](#angular-quick-start) and for more information Read the step by step [**Tutorial**](#angular-tutorial) or read the [**Getting started**](#angular-getting-started)
19+
20+
21+
to create a **Web Application with React 18**
22+
23+
24+
* Featuring [**React 18.2.0**](https://github.com/facebook/react/releases) & [**Create-react-app 5.0.1**](https://github.com/facebook/create-react-app/releases)
25+
26+
27+
28+
# [Angular Quick start](#angular-quick-start)
1829

1930
```bash
2031
# choose a repo
2132
# download the example or clone the repo from github
22-
git clone https://github.com/ganatan/angular-pwa.git
33+
git clone https://github.com/ganatan/angular-react-pwa.git
2334

2435
# download the example or clone the repo from gitlab
25-
git clone https://gitlab.com/ganatan/angular-pwa.git
26-
36+
git clone https://gitlab.com/ganatan/angular-react-pwa.git
2737

2838
# change directory
29-
cd angular-pwa
39+
cd angular-react-pwa
40+
cd angular
3041

3142
# install the repo with npm
3243
npm install
@@ -37,30 +48,77 @@ npm start
3748
```
3849
in your browser go to [http://localhost:4200](http://localhost:4200)
3950

40-
## Getting Started
4151

42-
### Installation
52+
# [React Quick start](#react-quick-start)
53+
54+
```bash
55+
# choose a repo
56+
# download the example or clone the repo from github
57+
git clone https://github.com/ganatan/angular-react-pwa.git
58+
59+
# download the example or clone the repo from gitlab
60+
git clone https://gitlab.com/ganatan/angular-react-pwa.git
61+
62+
# change directory
63+
cd angular-react-pwa
64+
cd react
65+
66+
# install the repo with npm
67+
npm install
68+
69+
# start the server
70+
npm start
71+
72+
```
73+
in your browser go to [http://localhost:3000](http://localhost:3000)
74+
75+
76+
# [Angular Getting started](#angular-getting-started)
77+
78+
79+
## Installation
80+
* `npm install` (installing dependencies)
81+
* `npm outdated` (verifying dependencies)
82+
83+
## Development
84+
* `npm run start`
85+
* in your browser go to [http://localhost:4200](http://localhost:4200)
86+
87+
## Production
88+
* `npm run build`
89+
90+
## Linter
91+
* `npm run lint`
92+
93+
## Tests
94+
* `npm run test`
95+
* `npm run coverage`
96+
97+
98+
99+
# [React Getting started](#react-getting-started)
100+
101+
102+
## Installation
43103
* `npm install` (installing dependencies)
44104
* `npm outdated` (verifying dependencies)
45105

46-
### Developpement
106+
## Development
47107
* `npm run start`
48-
* in your browser [http://localhost:4200](http://localhost:4200)
108+
* in your browser go to [http://localhost:3000](http://localhost:3000)
109+
110+
## Production
111+
* `npm run build`
112+
113+
## Linter
114+
* `npm run lint`
49115

50-
## Tests (Use Chrome Version 87 minimum)
116+
## Tests
51117
* `npm run test`
118+
* `npm run coverage`
52119

53-
### Compilation
54-
* `npm run build` ( without SSR)
55-
* `npm run build:ssr` ( with SSR)
56120

57-
### Production
58-
* `npm run serve:ssr`
59-
* in your browser [http://localhost:4000](http://localhost:4000)
60121

61-
### Prototype Bootstrap 5
62-
* `change directory` cd ui
63-
* launch html pages in your browser
64122

65123
### Author
66124
* Author : danny
File renamed without changes.
File renamed without changes.

angular/.eslintrc.json

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": [
4+
"projects/**/*"
5+
],
6+
"overrides": [
7+
{
8+
"files": [
9+
"*.ts"
10+
],
11+
"parserOptions": {
12+
"project": [
13+
"tsconfig.json"
14+
],
15+
"createDefaultProgram": true
16+
},
17+
"extends": [
18+
"plugin:@angular-eslint/recommended",
19+
"plugin:@angular-eslint/template/process-inline-templates"
20+
],
21+
"rules": {
22+
"no-undefined": "error",
23+
"no-var": "error",
24+
"prefer-const": "error",
25+
"func-names": "error",
26+
"id-length": "error",
27+
"newline-before-return": "error",
28+
"space-before-blocks": "error",
29+
"no-alert": "error",
30+
"@angular-eslint/directive-selector": [
31+
"error",
32+
{
33+
"type": "attribute",
34+
"prefix": "app",
35+
"style": "camelCase"
36+
}
37+
],
38+
"@angular-eslint/component-selector": [
39+
"error",
40+
{
41+
"type": "element",
42+
"prefix": "app",
43+
"style": "kebab-case"
44+
}
45+
]
46+
}
47+
},
48+
{
49+
"files": [
50+
"*.html"
51+
],
52+
"extends": [
53+
"plugin:@angular-eslint/template/recommended"
54+
],
55+
"rules": {}
56+
}
57+
]
58+
}
Lines changed: 9 additions & 13 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
11+
npm-debug.log
12+
yarn-error.log
1513

1614
# IDEs and editors
17-
/.idea
15+
.idea/
1816
.project
1917
.classpath
2018
.c9/
2119
*.launch
2220
.settings/
2321
*.sublime-workspace
2422

25-
# IDE - VSCode
23+
# Visual Studio Code
2624
.vscode/*
2725
!.vscode/settings.json
2826
!.vscode/tasks.json
2927
!.vscode/launch.json
3028
!.vscode/extensions.json
3129
.history/*
3230

33-
# misc
31+
# Miscellaneous
3432
/.angular/cache
35-
/.sass-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
File renamed without changes.
File renamed without changes.
File renamed without changes.

angular.json renamed to angular/angular.json

Lines changed: 12 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"build": {
1818
"builder": "@angular-devkit/build-angular:browser",
1919
"options": {
20-
"outputPath": "dist/angular-starter/browser",
20+
"outputPath": "dist/angular-starter",
2121
"index": "src/index.html",
2222
"main": "src/main.ts",
2323
"polyfills": "src/polyfills.ts",
@@ -44,12 +44,12 @@
4444
"budgets": [
4545
{
4646
"type": "initial",
47-
"maximumWarning": "1mb",
47+
"maximumWarning": "500kb",
4848
"maximumError": "1mb"
4949
},
5050
{
5151
"type": "anyComponentStyle",
52-
"maximumWarning": "4kb",
52+
"maximumWarning": "2kb",
5353
"maximumError": "4kb"
5454
}
5555
],
@@ -108,66 +108,19 @@
108108
"scripts": []
109109
}
110110
},
111-
"server": {
112-
"builder": "@angular-devkit/build-angular:server",
111+
"lint": {
112+
"builder": "@angular-eslint/builder:lint",
113113
"options": {
114-
"outputPath": "dist/angular-starter/server",
115-
"main": "server.ts",
116-
"tsConfig": "tsconfig.server.json"
117-
},
118-
"configurations": {
119-
"production": {
120-
"outputHashing": "media",
121-
"fileReplacements": [
122-
{
123-
"replace": "src/environments/environment.ts",
124-
"with": "src/environments/environment.prod.ts"
125-
}
126-
]
127-
},
128-
"development": {
129-
"optimization": false,
130-
"sourceMap": true,
131-
"extractLicenses": false
132-
}
133-
},
134-
"defaultConfiguration": "production"
135-
},
136-
"serve-ssr": {
137-
"builder": "@nguniversal/builders:ssr-dev-server",
138-
"configurations": {
139-
"development": {
140-
"browserTarget": "angular-starter:build:development",
141-
"serverTarget": "angular-starter:server:development"
142-
},
143-
"production": {
144-
"browserTarget": "angular-starter:build:production",
145-
"serverTarget": "angular-starter:server:production"
146-
}
147-
},
148-
"defaultConfiguration": "development"
149-
},
150-
"prerender": {
151-
"builder": "@nguniversal/builders:prerender",
152-
"options": {
153-
"routes": [
154-
"/"
114+
"lintFilePatterns": [
115+
"src/**/*.ts",
116+
"src/**/*.html"
155117
]
156-
},
157-
"configurations": {
158-
"production": {
159-
"browserTarget": "angular-starter:build:production",
160-
"serverTarget": "angular-starter:server:production"
161-
},
162-
"development": {
163-
"browserTarget": "angular-starter:build:development",
164-
"serverTarget": "angular-starter:server:development"
165-
}
166-
},
167-
"defaultConfiguration": "production"
118+
}
168119
}
169120
}
170121
}
171122
},
172-
"defaultProject": "angular-starter"
123+
"cli": {
124+
"defaultCollection": "@angular-eslint/schematics"
125+
}
173126
}
File renamed without changes.

0 commit comments

Comments
 (0)