ソースを参照

Converted to PWA

master
kj1352 5年前
コミット
d6462d84e0
15個のファイルの変更109行の追加5行の削除
  1. +7
    -3
      angular.json
  2. +29
    -0
      ngsw-config.json
  3. +5
    -0
      package-lock.json
  4. +1
    -0
      package.json
  5. +4
    -1
      src/app/app.module.ts
  6. バイナリ
      src/assets/icons/icon-128x128.png
  7. バイナリ
      src/assets/icons/icon-144x144.png
  8. バイナリ
      src/assets/icons/icon-152x152.png
  9. バイナリ
      src/assets/icons/icon-192x192.png
  10. バイナリ
      src/assets/icons/icon-384x384.png
  11. バイナリ
      src/assets/icons/icon-512x512.png
  12. バイナリ
      src/assets/icons/icon-72x72.png
  13. バイナリ
      src/assets/icons/icon-96x96.png
  14. +4
    -1
      src/index.html
  15. +59
    -0
      src/manifest.webmanifest

+ 7
- 3
angular.json ファイルの表示

@@ -25,7 +25,8 @@
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.webmanifest"
],
"styles": [
"src/styles.scss"
@@ -59,7 +60,9 @@
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
}
}
},
@@ -89,7 +92,8 @@
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.webmanifest"
],
"styles": [
"src/styles.scss"


+ 29
- 0
ngsw-config.json ファイルの表示

@@ -0,0 +1,29 @@
{
"$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/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
]
}

+ 5
- 0
package-lock.json ファイルの表示

@@ -485,6 +485,11 @@
"resolved": "https://registry.npmjs.org/@angular/router/-/router-9.1.9.tgz",
"integrity": "sha512-4u+CWMPB4hCkAsFCEzC94YEWT0wVozqGkc/Dortt2hFaqvZpIegg6iJVZlDxuyDjzFYBPnnbTDdgiTTA8ckfuA=="
},
"@angular/service-worker": {
"version": "9.1.9",
"resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-9.1.9.tgz",
"integrity": "sha512-TRN9SD38VfyrVwObeAYhogQqSHl9hax51Vi/egEt/LXdOFBIssLsW0Wa3WOByzo25zcR3M2mMbQ7UuWtUnfduA=="
},
"@babel/code-frame": {
"version": "7.10.1",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz",


+ 1
- 0
package.json ファイルの表示

@@ -19,6 +19,7 @@
"@angular/platform-browser": "~9.1.1",
"@angular/platform-browser-dynamic": "~9.1.1",
"@angular/router": "~9.1.1",
"@angular/service-worker": "~9.1.1",
"angular-svg-icon": "^9.2.0",
"rxjs": "~6.5.4",
"tslib": "^1.10.0",


+ 4
- 1
src/app/app.module.ts ファイルの表示

@@ -14,6 +14,8 @@ import { MoreComponent } from './tabs/more/more.component';
import { DetailsComponent } from './tabs/courses/details/details.component';
import { VideoChapterComponent } from './tabs/courses/video-chapter/video-chapter.component';
import { NotesDetailsComponent } from './tabs/courses/notes-details/notes-details.component';
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';

@NgModule({
declarations: [
@@ -32,7 +34,8 @@ import { NotesDetailsComponent } from './tabs/courses/notes-details/notes-detail
BrowserModule,
AppRoutingModule,
HttpClientModule,
AngularSvgIconModule.forRoot()
AngularSvgIconModule.forRoot(),
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
],
providers: [],
bootstrap: [AppComponent]


バイナリ
src/assets/icons/icon-128x128.png ファイルの表示

変更前 変更後
幅: 128  |  高さ: 128  |  サイズ: 1.2 KiB

バイナリ
src/assets/icons/icon-144x144.png ファイルの表示

変更前 変更後
幅: 144  |  高さ: 144  |  サイズ: 1.4 KiB

バイナリ
src/assets/icons/icon-152x152.png ファイルの表示

変更前 変更後
幅: 152  |  高さ: 152  |  サイズ: 1.4 KiB

バイナリ
src/assets/icons/icon-192x192.png ファイルの表示

変更前 変更後
幅: 192  |  高さ: 192  |  サイズ: 1.7 KiB

バイナリ
src/assets/icons/icon-384x384.png ファイルの表示

変更前 変更後
幅: 384  |  高さ: 384  |  サイズ: 3.5 KiB

バイナリ
src/assets/icons/icon-512x512.png ファイルの表示

変更前 変更後
幅: 512  |  高さ: 512  |  サイズ: 4.9 KiB

バイナリ
src/assets/icons/icon-72x72.png ファイルの表示

変更前 変更後
幅: 72  |  高さ: 72  |  サイズ: 792 B

バイナリ
src/assets/icons/icon-96x96.png ファイルの表示

変更前 変更後
幅: 96  |  高さ: 96  |  サイズ: 958 B

+ 4
- 1
src/index.html ファイルの表示

@@ -7,11 +7,14 @@
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&amp;display=swap" rel="stylesheet">
<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#4d4d4d">
</head>

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

</html>

+ 59
- 0
src/manifest.webmanifest ファイルの表示

@@ -0,0 +1,59 @@
{
"name": "LMS",
"short_name": "LMS",
"theme_color": "#4d4d4d",
"background_color": "#4d4d4d",
"display": "standalone",
"scope": "./",
"start_url": "./",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png",
"purpose": "maskable any"
},
{
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable any"
}
]
}