Skip to content

Commit

Permalink
refactor: format code
Browse files Browse the repository at this point in the history
  • Loading branch information
BioPhoton committed May 3, 2023
1 parent fe70af9 commit d94fc6f
Show file tree
Hide file tree
Showing 114 changed files with 141,811 additions and 1,831 deletions.
16 changes: 4 additions & 12 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"root": true,
"ignorePatterns": [
"**/*"
],
"ignorePatterns": ["**/*"],
"overrides": [
{
"files": [
"*.ts"
],
"files": ["*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.*?.json"
Expand Down Expand Up @@ -38,12 +34,8 @@
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
Expand Down
52 changes: 26 additions & 26 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceRoot}"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"url": "http://localhost:9876/debug.html",
"webRoot": "${workspaceRoot}"
},
{
"name": "ng e2e",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
"protocol": "inspector",
"args": ["${workspaceRoot}/protractor.conf.js"]
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "chrome",
"request": "launch",
"url": "http://localhost:4200/#",
"webRoot": "${workspaceRoot}"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"url": "http://localhost:9876/debug.html",
"webRoot": "${workspaceRoot}"
},
{
"name": "ng e2e",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/node_modules/protractor/bin/protractor",
"protocol": "inspector",
"args": ["${workspaceRoot}/protractor.conf.js"]
}
]
}
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}
142 changes: 48 additions & 94 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,101 +1,55 @@
# angular-movies

This is a Movies App built using [Angular](https://angular.io) and [RxAngular](https://github.com/rx-angular/rx-angular).
As data source the [The Movie Database (TMDB)](https://www.themoviedb.org/) API is used.
As data source the [The Movie Database (TMDB)](https://www.themoviedb.org/) API is used.

[![angular-and-rx-angular](https://user-images.githubusercontent.com/10064416/154189195-c32cbdec-b061-46a5-8590-a9e3d8dc050a.png)](https://www.rx-angular.io/)


## [Demo](https://angular-movies-a12d3.web.app/list/category/popular)

A [live deployment](https://angular-movies-a12d3.web.app/list/category/popular) of this app is available to try it out.


## Performance Optimizations

## Performance Optimizations

[![angular-movies--after-before](https://user-images.githubusercontent.com/10064416/155904454-f70b5bb5-6591-497a-9d21-dca0e2940566.gif)](https://www.webpagetest.org/video/compare.php?tests=220216_BiDcPP_CVM,220216_AiDcBN_ETK)


For now you can search the codebase for "Perf Tip" later on there will be propper documentation here.


[Measures before optimization](https://lighthouse-metrics.com/checks/9ddeb46e-2c28-453c-b719-cf080a01b13c)
[![angular-movies-before_michael-hladky](https://user-images.githubusercontent.com/10064416/137785051-1cf9f63a-e803-4d92-a952-c327b7628530.PNG)](https://lighthouse-metrics.com/checks/9ddeb46e-2c28-453c-b719-cf080a01b13c)


[Measures after optimization](https://lighthouse-metrics.com/checks/6a888a17-b17b-46a6-abc9-e605b73a530c/runs/503701ad-36aa-43ad-8de3-cb40e775c770)
![angular-movies-after-optimization_michael-hladky](https://user-images.githubusercontent.com/10064416/146446241-ad9eeed4-b0a4-44a2-a88e-4ea7c97e1acf.PNG)


**Bundle Stats**





















<!-- bundle-stats-start -->
| Names | Size |
| --- | --- |
| main.5c948ae0992d1a80.js | 339.49 KB |
| styles.599b610bd1f0a4a0.css | 6.17 KB |
| runtime.6797c9c16e1728d6.js | 4.27 KB |
| **Initial Total** | **349.94 KB** |
| Names | Size |
| app_pages_movie-detail-page_movie-detail-page_component_ts.e17389ba1875f3d9.js | 16.47 KB |
| a-4d8953.349fba989c46042c.js | 12.87 KB |
| app_pages_person-detail-page_person-detail-page_component_ts.64985374cb6c4f7b.js | 11.48 KB |
| app_app-shell_account-menu_account-menu_component_ts.e9e907e242916627.js | 8.22 KB |
| common.5199ece5cc4e99ca.js | 7.2 KB |
| app_pages_account-feature_list-detail-page_list-items-edit_list-items-edi-13eb42.a870ce70a99e0ccb.js | 6.98 KB |
| app_pages_movie-list-page_movie-list-page_component_ts.022db873e0727104.js | 5.8 KB |
| app_pages_account-feature_account-list-page_account-list-page_component_ts.06bbcc7cda9f2696.js | 5.61 KB |
| app_pages_account-feature_list-create-page_list-create-page_component_ts--1f481e.029250b2c6f5104c.js | 5.53 KB |
| app_pages_account-feature_list-detail-page_list-image_list-image_componen-cb4b89.df4a127d92d09533.js | 4.28 KB |
| app_pages_account-feature_list-detail-page_list-remove_list-remove_compon-a10eb2.bcb9ffb8caf8099c.js | 3.39 KB |
| app_pages_account-feature_list-detail-page_list-detail-page_component_ts--a2c81d.264e9b588f53f6c7.js | 3.1 KB |
| app_pages_not-found-page_not-found-page_component_ts.ed5bb019cc4798bb.js | 1.65 KB |
| app_pages_account-feature_list-detail-page_list-detail-page_routes_ts.5b1869fe0562a45f.js | 1.5 KB |
| app_pages_account-feature_account-feature-page_routes_ts.20b77bf6427b5dcd.js | 851 Bytes |
| app_pages_account-feature_list-detail-page_list-movies_list-movies_component_ts.5b118c0a340f91cd.js | 657 Bytes |
<!-- bundle-stats-end -->




















| Names | Size |
| ---------------------------------------------------------------------------------------------------- | ------------- |
| main.5c948ae0992d1a80.js | 339.49 KB |
| styles.599b610bd1f0a4a0.css | 6.17 KB |
| runtime.6797c9c16e1728d6.js | 4.27 KB |
| **Initial Total** | **349.94 KB** |
| Names | Size |
| app_pages_movie-detail-page_movie-detail-page_component_ts.e17389ba1875f3d9.js | 16.47 KB |
| a-4d8953.349fba989c46042c.js | 12.87 KB |
| app_pages_person-detail-page_person-detail-page_component_ts.64985374cb6c4f7b.js | 11.48 KB |
| app_app-shell_account-menu_account-menu_component_ts.e9e907e242916627.js | 8.22 KB |
| common.5199ece5cc4e99ca.js | 7.2 KB |
| app_pages_account-feature_list-detail-page_list-items-edit_list-items-edi-13eb42.a870ce70a99e0ccb.js | 6.98 KB |
| app_pages_movie-list-page_movie-list-page_component_ts.022db873e0727104.js | 5.8 KB |
| app_pages_account-feature_account-list-page_account-list-page_component_ts.06bbcc7cda9f2696.js | 5.61 KB |
| app_pages_account-feature_list-create-page_list-create-page_component_ts--1f481e.029250b2c6f5104c.js | 5.53 KB |
| app_pages_account-feature_list-detail-page_list-image_list-image_componen-cb4b89.df4a127d92d09533.js | 4.28 KB |
| app_pages_account-feature_list-detail-page_list-remove_list-remove_compon-a10eb2.bcb9ffb8caf8099c.js | 3.39 KB |
| app_pages_account-feature_list-detail-page_list-detail-page_component_ts--a2c81d.264e9b588f53f6c7.js | 3.1 KB |
| app_pages_not-found-page_not-found-page_component_ts.ed5bb019cc4798bb.js | 1.65 KB |
| app_pages_account-feature_list-detail-page_list-detail-page_routes_ts.5b1869fe0562a45f.js | 1.5 KB |
| app_pages_account-feature_account-feature-page_routes_ts.20b77bf6427b5dcd.js | 851 Bytes |
| app_pages_account-feature_list-detail-page_list-movies_list-movies_component_ts.5b118c0a340f91cd.js | 657 Bytes |

<!-- bundle-stats-end -->

## Comparison to next and nuxt

Expand All @@ -107,51 +61,52 @@ For now you can search the codebase for "Perf Tip" later on there will be proppe

## Contributing

Contributions are always welcome!
Contributions are always welcome!

For large changes, please file an issue to discuss your proposed changes with us before working on a PR :)

## Installation
## Installation

Clone and install the dependencies for `angular-movies` locally:

```bash
```bash
git clone https://github.com/tastejs/angular-movies.git
cd angular-movies
cd angular-movies
npm install
```

## Quick setup

1. Take a copy of `src/environments/environment.local.example.ts` and re-name to `src/environments/environment.prod.ts`
1. Take a copy of `src/environments/environment.local.example.ts` and re-name to `src/environments/environment.prod.ts`
2. Get your TMDb API key
3. Get your TMDB API read access token
4. Enter the details into the `src/environments/environment.prod.ts` file

## Running locally

* `npm run build:dev`: dev build
* `npm run build:prod`: production build
* `npm run build:prod:ssr`: production build for SSR
* `npm run start`: serve the project locally for development
* `npm run start:ssr:dev`: serve the project locally SSR for development
* `npm run start:ssr:prod`: serve the project locally SSR for production
* `npm run analyze:bundlesize`: bundle size analysis
- `npm run build:dev`: dev build
- `npm run build:prod`: production build
- `npm run build:prod:ssr`: production build for SSR
- `npm run start`: serve the project locally for development
- `npm run start:ssr:dev`: serve the project locally SSR for development
- `npm run start:ssr:prod`: serve the project locally SSR for production
- `npm run analyze:bundlesize`: bundle size analysis

## Tech Stack

Built with:
Built with:

* [Angular](https://angular.io)
* [rx-angular](https://github.com/rx-angular/rx-angular)
- [Angular](https://angular.io)
- [rx-angular](https://github.com/rx-angular/rx-angular)

[![angular-and-rx-angular](https://user-images.githubusercontent.com/10064416/154189195-c32cbdec-b061-46a5-8590-a9e3d8dc050a.png)](https://www.rx-angular.io/)

Measures:
* Bundle sice listed fron dist
* Comparison videos with [webpagetest](https://www.webpagetest.org)
* Lighthoure reports with [lighthouse-metrics](https://lighthouse-metrics.com)
* User-flows created with [@push-based/user-flow](https://www.npmjs.com/package/@push-based/user-flow)

- Bundle sice listed fron dist
- Comparison videos with [webpagetest](https://www.webpagetest.org)
- Lighthoure reports with [lighthouse-metrics](https://lighthouse-metrics.com)
- User-flows created with [@push-based/user-flow](https://www.npmjs.com/package/@push-based/user-flow)

## Authors

Expand All @@ -161,9 +116,8 @@ Measures:
- [Julian Jandl](https://github.com/HoebbelsB)
- [Vojtech Mašek](https://github.com/vmasek)


Based on the original `angular-movies` foundation by [@clamarque](https://github.com/clamarque/angular-movies).

## License

[MIT](https://choosealicense.com/licenses/mit/)
4 changes: 1 addition & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
"projects/movies/src/manifest.webmanifest",
"projects/movies/src/assets"
],
"styles": [
"projects/movies/src/styles.scss"
],
"styles": ["projects/movies/src/styles.scss"],
"scripts": []
},
"configurations": {
Expand Down
Loading

0 comments on commit d94fc6f

Please sign in to comment.