Skip to content

Commit e759b47

Browse files
committed
Merge branch 'release/1.3.0'
2 parents 41b98d2 + 677e8e6 commit e759b47

File tree

135 files changed

+583
-469
lines changed

Some content is hidden

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

135 files changed

+583
-469
lines changed

README.md

+41-46
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
- Unit tests with Jest instead of Karma & Jasmine.
4848
- e2e tests with Cypress instead of Protractor.
4949
- PWA
50-
- i18n
5150
- Dynamic titles and content meta tags.
5251
- TailwindCSS + Autoprefixer + PurgeCSS setup.
5352
- Dark mode and theme configuration.
@@ -62,9 +61,8 @@
6261
```
6362
Types of pages
6463
65-
+ = main page
66-
- = response page
67-
= regular page
64+
public: everybody can see them
65+
private: only logged in users can see them
6866
```
6967

7068
- General
@@ -236,7 +234,6 @@ yarn remove tailwindcss autoprefixer postcss
236234
```console
237235
├───app
238236
│ ├───@core
239-
│ │ ├───core
240237
│ │ ├───directives
241238
│ │ │ └───click-outside
242239
│ │ ├───guards
@@ -252,34 +249,36 @@ yarn remove tailwindcss autoprefixer postcss
252249
│ │ ├───footer
253250
│ │ ├───header
254251
│ │ └───layout
255-
│ └───pages
256-
│ ├───+auth
257-
│ │ ├───forgot-password
258-
│ │ ├───forgot-password-email-sent
259-
│ │ ├───password-reset
260-
│ │ ├───password-reset-failed
261-
│ │ ├───password-reset-succeeded
262-
│ │ ├───sign-in
263-
│ │ ├───sign-up
264-
│ │ └───_services
265-
│ ├───+home
266-
│ ├───+settings
267-
│ │ ├───account
268-
│ │ ├───appearance
269-
│ │ ├───billing
270-
│ │ ├───blocked-users
271-
│ │ ├───notifications
272-
│ │ ├───security
273-
│ │ └───security-log
274-
│ ├───+user
275-
│ │ ├───my-profile
276-
│ │ └───overview
277-
│ ├───dashboard
278-
│ └───_not-found
252+
│ ├───pages
253+
│ │ ├───private
254+
│ │ │ ├───dashboard
255+
│ │ │ ├───settings
256+
│ │ │ │ ├───account
257+
│ │ │ │ ├───appearance
258+
│ │ │ │ ├───billing
259+
│ │ │ │ ├───blocked-users
260+
│ │ │ │ ├───notifications
261+
│ │ │ │ ├───security
262+
│ │ │ │ └───security-log
263+
│ │ │ └───user
264+
│ │ │ ├───my-profile
265+
│ │ │ └───overview
266+
│ │ └───public
267+
│ │ ├───auth
268+
│ │ │ ├───forgot-password
269+
│ │ │ ├───forgot-password-email-sent
270+
│ │ │ ├───password-reset
271+
│ │ │ ├───password-reset-failed
272+
│ │ │ ├───password-reset-succeeded
273+
│ │ │ ├───sign-in
274+
│ │ │ ├───sign-up
275+
│ │ │ └───_services
276+
│ │ ├───home
277+
│ │ └───not-found
278+
│ └───router
279279
├───assets
280-
├───environments
281-
├───public
282280
│ └───icons
281+
├───environments
283282
└───theme
284283
├───01-base
285284
├───02-components
@@ -288,18 +287,14 @@ yarn remove tailwindcss autoprefixer postcss
288287

289288
## 🧙‍♂️ Commands
290289

291-
| Command | Description | NPM | Yarn | Background command |
292-
| ------------- | ------------------------------------------------- | --------------------- | ------------------ | --------------------------------------------------------------- |
293-
| ng | See available commands | npm run ng | yarn ng | ng |
294-
| dev | Run your app in development mode & open app | npm run dev | yarn dev | ng serve -o |
295-
| start | Run your app in development mode | npm start | yarn start | ng serve |
296-
| start:es | Run your app in development mode in spanish | npm run start:es | yarn start:es | ng serve -c=es --port 4201 |
297-
| build | Build your app | npm run build | yarn build | ng build |
298-
| build:prod | Build your app ready for production | npm run build:prod | yarn build:prod | ng build --prod --build-optimizer --aot --stats-json |
299-
| build:i18n | Build your multilingual app ready for production | npm run build:i18n | yarn build:i18n | ng build --prod --build-optimizer --aot --stats-json --localize |
300-
| test | Run your unit tests | npm run test | yarn test | ng test |
301-
| test:coverage | Run your unit tests & generates a coverage report | npm run test:coverage | yarn test:coverage | ng test --coverage |
302-
| lint | Use ESLint to lint your app | npm run lint | yarn lint | ng lint |
303-
| e2e | Run your e2e tests | npm run e2e | yarn e2e | ng e2e |
304-
| i18n:extract | Extract i18n messages from i18n directives | npm run extract | yarn extract | ng extract-i18n --output-path locale --ivy |
305-
| analyze | Open webpack-bundle-analyzer | npm run analyze | yarn analyze | webpack-bundle-analyzer dist/angular-boilerplate/stats.json |
290+
| Command | Description | NPM | Yarn | Background command |
291+
| ------------- | ------------------------------------------------- | --------------------- | ------------------ | ----------------------------------------------------------- |
292+
| ng | See available commands | npm run ng | yarn ng | ng |
293+
| start | Run your app in development mode | npm start | yarn start | ng serve |
294+
| build | Build your app | npm run build | yarn build | ng build |
295+
| build:prod | Build your app ready for production | npm run build:prod | yarn build:prod | ng build --prod --build-optimizer --aot --stats-json |
296+
| test:unit | Run your unit tests | npm run test | yarn test | ng test |
297+
| test:e2e | Run your e2e tests | npm run e2e | yarn e2e | ng e2e |
298+
| test:coverage | Run your unit tests & generates a coverage report | npm run test:coverage | yarn test:coverage | ng test --coverage |
299+
| lint | Use ESLint to lint your app | npm run lint | yarn lint | ng lint |
300+
| analyze | Open webpack-bundle-analyzer | npm run analyze | yarn analyze | webpack-bundle-analyzer dist/angular-boilerplate/stats.json |

angular.json

+8-34
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,9 @@
3232
"assets": [
3333
"src/favicon.ico",
3434
"src/assets",
35-
"src/public"
36-
],
37-
"styles": [
38-
"src/theme/styles.scss"
35+
"src/manifest.webmanifest"
3936
],
37+
"styles": ["src/theme/styles.scss"],
4038
"scripts": []
4139
},
4240
"configurations": {
@@ -68,11 +66,6 @@
6866
],
6967
"serviceWorker": true,
7068
"ngswConfigPath": "ngsw-config.json"
71-
},
72-
"es": {
73-
"localize": [
74-
"es"
75-
]
7669
}
7770
}
7871
},
@@ -84,40 +77,27 @@
8477
"configurations": {
8578
"production": {
8679
"browserTarget": "angular-boilerplate:build:production"
87-
},
88-
"es": {
89-
"browserTarget": "angular-boilerplate:build:es"
9080
}
9181
}
9282
},
93-
"extract-i18n": {
94-
"builder": "@angular-devkit/build-angular:extract-i18n",
95-
"options": {
96-
"browserTarget": "angular-boilerplate:build"
97-
}
98-
},
9983
"test": {
10084
"builder": "@angular-builders/jest:run",
10185
"options": {
10286
"polyfills": "src/polyfills.ts",
10387
"tsConfig": "tsconfig.spec.json",
10488
"assets": [
105-
"src/public/favicon.ico",
106-
"src/assets"
107-
],
108-
"styles": [
109-
"src/theme/styles.scss"
89+
"src/favicon.ico",
90+
"src/assets",
91+
"src/manifest.webmanifest"
11092
],
93+
"styles": ["src/theme/styles.scss"],
11194
"scripts": []
11295
}
11396
},
11497
"lint": {
11598
"builder": "@angular-eslint/builder:lint",
11699
"options": {
117-
"lintFilePatterns": [
118-
"src/**/*.ts",
119-
"src/**/*.html"
120-
]
100+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
121101
}
122102
},
123103
"e2e": {
@@ -157,14 +137,8 @@
157137
}
158138
}
159139
}
160-
},
161-
"i18n": {
162-
"sourceLocale": "en-US",
163-
"locales": {
164-
"es": "locale/messages.es.xlf"
165-
}
166140
}
167141
}
168142
},
169143
"defaultProject": "angular-boilerplate"
170-
}
144+
}

locale/messages.es.xlf

-39
This file was deleted.

locale/messages.xlf

-36
This file was deleted.

package.json

+3-7
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
"private": true,
66
"scripts": {
77
"ng": "ng",
8-
"dev": "ng serve -o",
98
"start": "ng serve",
10-
"start:es": "ng serve -c=es --port 4201",
119
"build": "ng build",
1210
"build:prod": "set NODE_ENV=production&& ng build --prod --build-optimizer --aot --stats-json",
13-
"build:i18n": "set NODE_ENV=production&& ng build --prod --build-optimizer --aot --stats-json --localize",
14-
"test": "ng test",
11+
"test:unit": "ng test",
12+
"test:e2e": "ng e2e",
1513
"test:coverage": "ng test --coverage",
1614
"lint": "ng lint",
17-
"e2e": "ng e2e",
18-
"i18n:extract": "ng extract-i18n --output-path locale --ivy",
1915
"analyze": "webpack-bundle-analyzer dist/angular-boilerplate/stats.json"
2016
},
2117
"dependencies": {
@@ -48,7 +44,7 @@
4844
"@cypress/webpack-preprocessor": "5.7.0",
4945
"@types/jasmine": "~3.6.9",
5046
"@types/jest": "26.0.23",
51-
"@types/node": "^14.14.39",
47+
"@types/node": "^14.14.39",
5248
"@typescript-eslint/eslint-plugin": "4.22.0",
5349
"@typescript-eslint/parser": "4.22.0",
5450
"autoprefixer": "^10.2.5",

src/app/@core/guards/auth.guard.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
RouterStateSnapshot,
77
UrlTree,
88
} from '@angular/router';
9-
import { AuthService } from '@app/pages/+auth/_services/auth.service';
9+
import { AuthService } from '@app/pages/public/auth/_services/auth.service';
1010
import { Path } from '@core/structs';
1111
import { Observable } from 'rxjs';
1212

src/app/@core/guards/no-auth.guard.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Injectable } from '@angular/core';
22
import { CanActivate, Router, UrlTree } from '@angular/router';
3-
import { AuthService } from '@app/pages/+auth/_services/auth.service';
3+
import { AuthService } from '@app/pages/public/auth/_services/auth.service';
44
import { Path } from '@core/structs';
55
import { Observable } from 'rxjs';
66

@@ -18,7 +18,7 @@ export class NoAuthGuard implements CanActivate {
1818
const isLoggedIn = this.authService.isLoggedIn;
1919

2020
if (isLoggedIn) {
21-
this.router.navigate([Path.App]);
21+
this.router.navigate([Path.Dashboard]);
2222
return false;
2323
}
2424

src/app/@core/structs/path.enum.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export enum Path {
44
NotFound = '404',
55

66
// Auth
7-
Auth = '',
87
SignIn = 'sign-in',
98
SignUp = 'sign-up',
109
ForgotPassword = 'forgot-password',
@@ -14,8 +13,7 @@ export enum Path {
1413
PasswordResetSucceeded = 'password-reset-succeeded',
1514

1615
// App base url
17-
App = 'app',
18-
Dashboard = '',
16+
Dashboard = 'dashboard',
1917

2018
// Settings
2119
Settings = 'settings',

0 commit comments

Comments
 (0)