Skip to content

Commit

Permalink
Merge pull request #3 from ImperialOctopus/pwa
Browse files Browse the repository at this point in the history
Set up progressive web app
  • Loading branch information
ImperialOctopus committed Feb 19, 2019
2 parents ba45999 + 11d9adf commit 49855ab
Show file tree
Hide file tree
Showing 19 changed files with 231 additions and 26 deletions.
11 changes: 0 additions & 11 deletions Word List.md

This file was deleted.

10 changes: 7 additions & 3 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.json"
],
"styles": [
"src/styles.scss"
Expand Down Expand Up @@ -55,7 +56,9 @@
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
],
"serviceWorker": true,
"ngswConfigPath": "src/ngsw-config.json"
}
}
},
Expand Down Expand Up @@ -89,7 +92,8 @@
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
"src/assets",
"src/manifest.json"
]
}
},
Expand Down
File renamed without changes
Binary file removed icon/icon-pink.png
Binary file not shown.
128 changes: 126 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"@angular/forms": "~7.2.0",
"@angular/platform-browser": "~7.2.0",
"@angular/platform-browser-dynamic": "~7.2.0",
"@angular/pwa": "^0.12.4",
"@angular/router": "~7.2.0",
"@angular/service-worker": "~7.2.0",
"braces": "^2.3.2",
"core-js": "^2.6.5",
"rxjs": "~6.3.3",
Expand Down
4 changes: 3 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import { RouterModule, Routes } from "@angular/router";
import { AppComponent } from "./app.component";
import { MenuComponent } from "./menu/menu.component";
import { PlayComponent } from "./play/play.component";
import { ServiceWorkerModule } from '@angular/service-worker';
import { environment } from '../environments/environment';

const appRoutes: Routes = [
{ path: "", component: MenuComponent },
Expand All @@ -14,7 +16,7 @@ const appRoutes: Routes = [

@NgModule({
declarations: [AppComponent, MenuComponent, PlayComponent],
imports: [BrowserModule, RouterModule.forRoot(appRoutes)],
imports: [BrowserModule, RouterModule.forRoot(appRoutes), ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })],
providers: [],
bootstrap: [AppComponent]
})
Expand Down
Binary file removed src/assets/icon.png
Binary file not shown.
Binary file added src/assets/icons/icon-128x128.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon-144x144.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon-152x152.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon-192x192.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon-384x384.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon-512x512.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon-72x72.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/icons/icon-96x96.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 15 additions & 9 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
<base href="/" />

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, user-scalable=no"
/>
<meta name="theme-color" content="#7F3F98" />
<meta name="msapplication-navbutton-color" content="#7F3F98" />
<meta name="apple-mobile-web-app-status-bar-style" content="#7F3F98" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#ab47bc" />
<meta name="msapplication-navbutton-color" content="#ab47bc" />
<meta name="apple-mobile-web-app-status-bar-style" content="#ab47bc" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@imperialoctopus" />
Expand All @@ -32,15 +29,24 @@
property="og:url"
content="https://fake-artist.imperialoctopus.com/"
/>
<meta property="og:image" content="assets/icon.png" />
<meta property="og:image" content="assets/icons/icon-192x192.png" />
<meta property="fb:admins" content="1525407123" />
<meta property="profile:first_name" content="Zoey" />
<meta property="profile:last_name" content="Child" />
<meta property="profile:gender" content="female" />
<meta property="profile:username" content="imperialoctopus" />
<link rel="icon" type="image/png" sizes="400x400" href="assets/icon.png" />
<link
rel="icon"
type="image/png"
sizes="72x72"
href="assets/icons/icon-72x72.png"
/>
<link rel="manifest" href="manifest.json" />
</head>
<body>
<app-root></app-root>
<noscript>
Please enable JavaScript to run this application.
</noscript>
</body>
</html>
51 changes: 51 additions & 0 deletions src/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"name": "Fake Artist Companion",
"short_name": "Fake Artist",
"theme_color": "#ab47bc",
"background_color": "#fafafa",
"display": "standalone",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "assets/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "assets/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "assets/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "assets/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "assets/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "assets/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "assets/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "assets/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
27 changes: 27 additions & 0 deletions src/ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/*.css",
"/*.js"
]
}
}, {
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
]
}

0 comments on commit 49855ab

Please sign in to comment.