Skip to content

Commit 59d953a

Browse files
committed
Add React example
1 parent 2482566 commit 59d953a

File tree

268 files changed

+40388
-6065
lines changed

Some content is hidden

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

268 files changed

+40388
-6065
lines changed

README.md

+78-26
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,42 @@
1-
# Angular 13 Example Bootstrap
1+
# Angular 13 & React 18 Examples Bootstrap
22

3-
> An Angular starter kit featuring [Angular 13.3.4](https://angular.io), [Angular CLI 13.3.3](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 Web Application with Angular
11+
it's part of a repo series designed to create a **Web Application with Angular 13**
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>
1613

17-
## Quick start
14+
* Featuring [**Angular 13.3.10**](https://github.com/angular/angular/releases) & [**Angular CLI 13.3.7**](https://github.com/angular/angular-cli/releases/)
15+
16+
17+
* 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)
18+
19+
20+
it's part of a repo series designed to create a **Web Application with React 18**
21+
22+
23+
* Featuring [**React 18.1.0**](https://github.com/facebook/react/releases) & [**Create-react-app 5.0.1**](https://github.com/facebook/create-react-app/releases)
24+
25+
26+
27+
# [Angular Quick start](#angular-quick-start)
1828

1929
```bash
20-
# select a repo
30+
# choose a repo
2131
# download the example or clone the repo from github
22-
git clone https://github.com/ganatan/angular-bootstrap.git
32+
git clone https://github.com/ganatan/angular-react-bootstrap.git
2333

2434
# download the example or clone the repo from gitlab
25-
git clone https://gitlab.com/ganatan/angular-bootstrap.git
26-
35+
git clone https://gitlab.com/ganatan/angular-react-bootstrap.git
2736

2837
# change directory
29-
cd angular-bootstrap
38+
cd angular-react-bootstrap
39+
cd angular
3040

3141
# install the repo with npm
3242
npm install
@@ -37,25 +47,67 @@ npm start
3747
```
3848
in your browser go to [http://localhost:4200](http://localhost:4200)
3949

40-
## Getting Started
4150

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

46-
### Developpement
101+
## Development
47102
* `npm run start`
48-
* in your browser [http://localhost:4200](http://localhost:4200)
103+
* in your browser go to [http://localhost:3000](http://localhost:3000)
49104

50-
### Production
105+
## Production
51106
* `npm run build`
52107

53108
## Tests
54109
* `npm run test`
55110

56-
### Prototype Bootstrap 5
57-
* `change directory` cd ui
58-
* launch html pages in your browser
59111

60112

61113
### Author
File renamed without changes.
File renamed without changes.

angular/.eslintrc.json

+58
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+
}

.gitignore angular/.gitignore

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

angular.json angular/angular.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,21 @@
103103
],
104104
"scripts": []
105105
}
106+
},
107+
"lint": {
108+
"builder": "@angular-eslint/builder:lint",
109+
"options": {
110+
"lintFilePatterns": [
111+
"src/**/*.ts",
112+
"src/**/*.html"
113+
]
114+
}
106115
}
107116
}
108117
}
109118
},
110-
"defaultProject": "angular-starter"
111-
}
119+
"defaultProject": "angular-starter",
120+
"cli": {
121+
"defaultCollection": "@angular-eslint/schematics"
122+
}
123+
}
File renamed without changes.

angular/nginx.conf

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
user www-data;
2+
worker_processes auto;
3+
pid /run/nginx.pid;
4+
include /etc/nginx/modules-enabled/*.conf;
5+
6+
events {
7+
worker_connections 768;
8+
}
9+
10+
http {
11+
sendfile on;
12+
tcp_nopush on;
13+
tcp_nodelay on;
14+
keepalive_timeout 65;
15+
types_hash_max_size 2048;
16+
include /etc/nginx/mime.types;
17+
default_type application/octet-stream;
18+
19+
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
20+
ssl_prefer_server_ciphers on;
21+
22+
access_log /var/log/nginx/access.log;
23+
error_log /var/log/nginx/error.log;
24+
25+
gzip on;
26+
27+
include /etc/nginx/conf.d/*.conf;
28+
29+
server {
30+
listen 80 default_server;
31+
listen [::]:80 default_server;
32+
root /var/www/html;
33+
index index.html index.htm index.nginx-debian.html;
34+
35+
server_name _;
36+
37+
location / {
38+
try_files $uri $uri/ =404;
39+
}
40+
41+
}
42+
43+
}
44+

0 commit comments

Comments
 (0)