Skip to content

Commit

Permalink
Merge branch 'release/1.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
jm2097 committed Apr 28, 2021
2 parents 41b98d2 + 677e8e6 commit e759b47
Show file tree
Hide file tree
Showing 135 changed files with 583 additions and 469 deletions.
87 changes: 41 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
- Unit tests with Jest instead of Karma & Jasmine.
- e2e tests with Cypress instead of Protractor.
- PWA
- i18n
- Dynamic titles and content meta tags.
- TailwindCSS + Autoprefixer + PurgeCSS setup.
- Dark mode and theme configuration.
Expand All @@ -62,9 +61,8 @@
```
Types of pages
+ = main page
- = response page
= regular page
public: everybody can see them
private: only logged in users can see them
```

- General
Expand Down Expand Up @@ -236,7 +234,6 @@ yarn remove tailwindcss autoprefixer postcss
```console
├───app
│ ├───@core
│ │ ├───core
│ │ ├───directives
│ │ │ └───click-outside
│ │ ├───guards
Expand All @@ -252,34 +249,36 @@ yarn remove tailwindcss autoprefixer postcss
│ │ ├───footer
│ │ ├───header
│ │ └───layout
│ └───pages
│ ├───+auth
│ │ ├───forgot-password
│ │ ├───forgot-password-email-sent
│ │ ├───password-reset
│ │ ├───password-reset-failed
│ │ ├───password-reset-succeeded
│ │ ├───sign-in
│ │ ├───sign-up
│ │ └───_services
│ ├───+home
│ ├───+settings
│ │ ├───account
│ │ ├───appearance
│ │ ├───billing
│ │ ├───blocked-users
│ │ ├───notifications
│ │ ├───security
│ │ └───security-log
│ ├───+user
│ │ ├───my-profile
│ │ └───overview
│ ├───dashboard
│ └───_not-found
│ ├───pages
│ │ ├───private
│ │ │ ├───dashboard
│ │ │ ├───settings
│ │ │ │ ├───account
│ │ │ │ ├───appearance
│ │ │ │ ├───billing
│ │ │ │ ├───blocked-users
│ │ │ │ ├───notifications
│ │ │ │ ├───security
│ │ │ │ └───security-log
│ │ │ └───user
│ │ │ ├───my-profile
│ │ │ └───overview
│ │ └───public
│ │ ├───auth
│ │ │ ├───forgot-password
│ │ │ ├───forgot-password-email-sent
│ │ │ ├───password-reset
│ │ │ ├───password-reset-failed
│ │ │ ├───password-reset-succeeded
│ │ │ ├───sign-in
│ │ │ ├───sign-up
│ │ │ └───_services
│ │ ├───home
│ │ └───not-found
│ └───router
├───assets
├───environments
├───public
│ └───icons
├───environments
└───theme
├───01-base
├───02-components
Expand All @@ -288,18 +287,14 @@ yarn remove tailwindcss autoprefixer postcss

## 🧙‍♂️ Commands

| Command | Description | NPM | Yarn | Background command |
| ------------- | ------------------------------------------------- | --------------------- | ------------------ | --------------------------------------------------------------- |
| ng | See available commands | npm run ng | yarn ng | ng |
| dev | Run your app in development mode & open app | npm run dev | yarn dev | ng serve -o |
| start | Run your app in development mode | npm start | yarn start | ng serve |
| start:es | Run your app in development mode in spanish | npm run start:es | yarn start:es | ng serve -c=es --port 4201 |
| build | Build your app | npm run build | yarn build | ng build |
| build:prod | Build your app ready for production | npm run build:prod | yarn build:prod | ng build --prod --build-optimizer --aot --stats-json |
| 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 |
| test | Run your unit tests | npm run test | yarn test | ng test |
| test:coverage | Run your unit tests & generates a coverage report | npm run test:coverage | yarn test:coverage | ng test --coverage |
| lint | Use ESLint to lint your app | npm run lint | yarn lint | ng lint |
| e2e | Run your e2e tests | npm run e2e | yarn e2e | ng e2e |
| i18n:extract | Extract i18n messages from i18n directives | npm run extract | yarn extract | ng extract-i18n --output-path locale --ivy |
| analyze | Open webpack-bundle-analyzer | npm run analyze | yarn analyze | webpack-bundle-analyzer dist/angular-boilerplate/stats.json |
| Command | Description | NPM | Yarn | Background command |
| ------------- | ------------------------------------------------- | --------------------- | ------------------ | ----------------------------------------------------------- |
| ng | See available commands | npm run ng | yarn ng | ng |
| start | Run your app in development mode | npm start | yarn start | ng serve |
| build | Build your app | npm run build | yarn build | ng build |
| build:prod | Build your app ready for production | npm run build:prod | yarn build:prod | ng build --prod --build-optimizer --aot --stats-json |
| test:unit | Run your unit tests | npm run test | yarn test | ng test |
| test:e2e | Run your e2e tests | npm run e2e | yarn e2e | ng e2e |
| test:coverage | Run your unit tests & generates a coverage report | npm run test:coverage | yarn test:coverage | ng test --coverage |
| lint | Use ESLint to lint your app | npm run lint | yarn lint | ng lint |
| analyze | Open webpack-bundle-analyzer | npm run analyze | yarn analyze | webpack-bundle-analyzer dist/angular-boilerplate/stats.json |
42 changes: 8 additions & 34 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@
"assets": [
"src/favicon.ico",
"src/assets",
"src/public"
],
"styles": [
"src/theme/styles.scss"
"src/manifest.webmanifest"
],
"styles": ["src/theme/styles.scss"],
"scripts": []
},
"configurations": {
Expand Down Expand Up @@ -68,11 +66,6 @@
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
},
"es": {
"localize": [
"es"
]
}
}
},
Expand All @@ -84,40 +77,27 @@
"configurations": {
"production": {
"browserTarget": "angular-boilerplate:build:production"
},
"es": {
"browserTarget": "angular-boilerplate:build:es"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-boilerplate:build"
}
},
"test": {
"builder": "@angular-builders/jest:run",
"options": {
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"assets": [
"src/public/favicon.ico",
"src/assets"
],
"styles": [
"src/theme/styles.scss"
"src/favicon.ico",
"src/assets",
"src/manifest.webmanifest"
],
"styles": ["src/theme/styles.scss"],
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
},
"e2e": {
Expand Down Expand Up @@ -157,14 +137,8 @@
}
}
}
},
"i18n": {
"sourceLocale": "en-US",
"locales": {
"es": "locale/messages.es.xlf"
}
}
}
},
"defaultProject": "angular-boilerplate"
}
}
39 changes: 0 additions & 39 deletions locale/messages.es.xlf

This file was deleted.

36 changes: 0 additions & 36 deletions locale/messages.xlf

This file was deleted.

10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
"private": true,
"scripts": {
"ng": "ng",
"dev": "ng serve -o",
"start": "ng serve",
"start:es": "ng serve -c=es --port 4201",
"build": "ng build",
"build:prod": "set NODE_ENV=production&& ng build --prod --build-optimizer --aot --stats-json",
"build:i18n": "set NODE_ENV=production&& ng build --prod --build-optimizer --aot --stats-json --localize",
"test": "ng test",
"test:unit": "ng test",
"test:e2e": "ng e2e",
"test:coverage": "ng test --coverage",
"lint": "ng lint",
"e2e": "ng e2e",
"i18n:extract": "ng extract-i18n --output-path locale --ivy",
"analyze": "webpack-bundle-analyzer dist/angular-boilerplate/stats.json"
},
"dependencies": {
Expand Down Expand Up @@ -48,7 +44,7 @@
"@cypress/webpack-preprocessor": "5.7.0",
"@types/jasmine": "~3.6.9",
"@types/jest": "26.0.23",
"@types/node": "^14.14.39",
"@types/node": "^14.14.39",
"@typescript-eslint/eslint-plugin": "4.22.0",
"@typescript-eslint/parser": "4.22.0",
"autoprefixer": "^10.2.5",
Expand Down
2 changes: 1 addition & 1 deletion src/app/@core/guards/auth.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
RouterStateSnapshot,
UrlTree,
} from '@angular/router';
import { AuthService } from '@app/pages/+auth/_services/auth.service';
import { AuthService } from '@app/pages/public/auth/_services/auth.service';
import { Path } from '@core/structs';
import { Observable } from 'rxjs';

Expand Down
4 changes: 2 additions & 2 deletions src/app/@core/guards/no-auth.guard.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from '@angular/core';
import { CanActivate, Router, UrlTree } from '@angular/router';
import { AuthService } from '@app/pages/+auth/_services/auth.service';
import { AuthService } from '@app/pages/public/auth/_services/auth.service';
import { Path } from '@core/structs';
import { Observable } from 'rxjs';

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

if (isLoggedIn) {
this.router.navigate([Path.App]);
this.router.navigate([Path.Dashboard]);
return false;
}

Expand Down
4 changes: 1 addition & 3 deletions src/app/@core/structs/path.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ export enum Path {
NotFound = '404',

// Auth
Auth = '',
SignIn = 'sign-in',
SignUp = 'sign-up',
ForgotPassword = 'forgot-password',
Expand All @@ -14,8 +13,7 @@ export enum Path {
PasswordResetSucceeded = 'password-reset-succeeded',

// App base url
App = 'app',
Dashboard = '',
Dashboard = 'dashboard',

// Settings
Settings = 'settings',
Expand Down

1 comment on commit e759b47

@vercel
Copy link

@vercel vercel bot commented on e759b47 Apr 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.