Skip to content

Commit

Permalink
Merge pull request #47 from LemmyMwaura/feat-pwa-favicon-#10
Browse files Browse the repository at this point in the history
setup pwa capabilities and favicons PR (#10)
  • Loading branch information
jrosseel committed Aug 31, 2022
2 parents 1de51ac + 5465b9a commit a13ebc0
Show file tree
Hide file tree
Showing 77 changed files with 735 additions and 117 deletions.
30 changes: 30 additions & 0 deletions apps/conv-learning-manager/ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"$schema": "../../node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
]
}
}
]
}
15 changes: 11 additions & 4 deletions apps/conv-learning-manager/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/apps/conv-learning-manager",
"index": "apps/conv-learning-manager/src/index.html",
Expand All @@ -15,7 +17,8 @@
"inlineStyleLanguage": "scss",
"assets": [
"apps/conv-learning-manager/src/favicon.ico",
"apps/conv-learning-manager/src/assets"
"apps/conv-learning-manager/src/assets",
"apps/conv-learning-manager/src/manifest.webmanifest"
],
"styles": [
"apps/conv-learning-manager/src/styles.scss",
Expand All @@ -26,7 +29,9 @@
"libs/elements/theming"
]
},
"scripts": []
"scripts": [],
"serviceWorker": true,
"ngswConfigPath": "apps/conv-learning-manager/ngsw-config.json"
},
"configurations": {
"production": {
Expand Down Expand Up @@ -91,7 +96,9 @@
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/apps/conv-learning-manager"],
"outputs": [
"coverage/apps/conv-learning-manager"
],
"options": {
"jestConfig": "apps/conv-learning-manager/jest.config.ts",
"passWithNoTests": true
Expand Down
10 changes: 8 additions & 2 deletions apps/conv-learning-manager/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { environment } from '../environments/environment';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app.routing.module';
import { ServiceWorkerModule } from '@angular/service-worker';

@NgModule({
declarations: [AppComponent],
Expand Down Expand Up @@ -65,8 +66,13 @@ import { AppRoutingModule } from './app.routing.module';
// MessagingStateModule.forRoot(),
// CommChannelsStateModule.forRoot(),

AppRoutingModule
// ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })],
AppRoutingModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: environment.production,
// Register the ServiceWorker as soon as the application is stable
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000'
})
],
providers: [],
bootstrap: [AppComponent],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 30 additions & 8 deletions apps/conv-learning-manager/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,43 @@
<html lang="en">

<head>
<meta charset="utf-8" />
<meta charset="utf-8"/>
<title>Elewa Conversational Learning Manager</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<base href="/"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>

<!-- favicon icons -->
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="assets/favicons/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/favicons/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/favicons/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/favicons/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="assets/favicons/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="assets/favicons/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="assets/favicons/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="assets/favicons/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="assets/favicons/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="assets/favicons/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="assets/favicons/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="assets/favicons/favicon-16x16.png" sizes="16x16" />
<link rel="icon" type="image/png" href="assets/favicons/favicon-128.png" sizes="128x128" />
<meta name="application-name" content="&nbsp;"/>
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta name="msapplication-TileImage" content="assets/favicons/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="assets/favicons/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="assets/favicons/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="assets/favicons/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="assets/favicons/mstile-310x310.png" />

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&amp;display=swap" rel="stylesheet">
<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#1976d2">
</head>

<body>
<convl-root></convl-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>

</html>
59 changes: 59 additions & 0 deletions apps/conv-learning-manager/src/manifest.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"name": "conv-learning-manager",
"short_name": "conv-learning-manager",
"theme_color": "#1976d2",
"background_color": "#fafafa",
"display": "standalone",
"scope": "./",
"start_url": "./",
"icons": [
{
"src": "assets/pwaicons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/pwaicons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/pwaicons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/pwaicons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/pwaicons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/pwaicons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/pwaicons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/pwaicons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}
4 changes: 3 additions & 1 deletion libs/elements/base/authorisation/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/base/authorisation"],
"outputs": [
"coverage/libs/elements/base/authorisation"
],
"options": {
"jestConfig": "libs/elements/base/authorisation/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/elements/base/configuration/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/base/configuration"],
"outputs": [
"coverage/libs/elements/base/configuration"
],
"options": {
"jestConfig": "libs/elements/base/configuration/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/elements/base/date-time/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/base/date-time"],
"outputs": [
"coverage/libs/elements/base/date-time"
],
"options": {
"jestConfig": "libs/elements/base/date-time/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/elements/base/firebase/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/base/firebase"],
"outputs": [
"coverage/libs/elements/base/firebase"
],
"options": {
"jestConfig": "libs/elements/base/firebase/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/elements/layout/page-convl/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/layout/page-convl"],
"outputs": [
"coverage/libs/elements/layout/page-convl"
],
"options": {
"jestConfig": "libs/elements/layout/page-convl/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/elements/layout/page/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/layout/page"],
"outputs": [
"coverage/libs/elements/layout/page"
],
"options": {
"jestConfig": "libs/elements/layout/page/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/elements/layout/user-menu/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/layout/user-menu"],
"outputs": [
"coverage/libs/elements/layout/user-menu"
],
"options": {
"jestConfig": "libs/elements/layout/user-menu/jest.config.ts",
"passWithNoTests": true
Expand Down
12 changes: 9 additions & 3 deletions libs/elements/nav/convl/breadcrumbs/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@
"targets": {
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"outputs": [
"{options.outputFile}"
],
"options": {
"lintFilePatterns": ["libs/elements/nav/convl/breadcrumbs/**/*.ts"]
"lintFilePatterns": [
"libs/elements/nav/convl/breadcrumbs/**/*.ts"
]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/elements/nav/convl/breadcrumbs"],
"outputs": [
"coverage/libs/elements/nav/convl/breadcrumbs"
],
"options": {
"jestConfig": "libs/elements/nav/convl/breadcrumbs/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/features/app/auth/login/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/features/app/auth/login"],
"outputs": [
"coverage/libs/features/app/auth/login"
],
"options": {
"jestConfig": "libs/features/app/auth/login/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/features/convs-mgr/home/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/features/convs-mgr/home"],
"outputs": [
"coverage/libs/features/convs-mgr/home"
],
"options": {
"jestConfig": "libs/features/convs-mgr/home/jest.config.ts",
"passWithNoTests": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/features/convs-mgr/stories/blocks/library"],
"outputs": [
"coverage/libs/features/convs-mgr/stories/blocks/library"
],
"options": {
"jestConfig": "libs/features/convs-mgr/stories/blocks/library/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/features/convs-mgr/stories/blocks/main/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/features/convs-mgr/stories/blocks/main"],
"outputs": [
"coverage/libs/features/convs-mgr/stories/blocks/main"
],
"options": {
"jestConfig": "libs/features/convs-mgr/stories/blocks/main/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/features/convs-mgr/stories/editor/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/features/convs-mgr/stories/editor"],
"outputs": [
"coverage/libs/features/convs-mgr/stories/editor"
],
"options": {
"jestConfig": "libs/features/convs-mgr/stories/editor/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 3 additions & 1 deletion libs/features/convs-mgr/stories/home/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"targets": {
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/libs/features/convs-mgr/stories/home"],
"outputs": [
"coverage/libs/features/convs-mgr/stories/home"
],
"options": {
"jestConfig": "libs/features/convs-mgr/stories/home/jest.config.ts",
"passWithNoTests": true
Expand Down
Loading

0 comments on commit a13ebc0

Please sign in to comment.