Skip to content

Commit ceaa4af

Browse files
committed
Merge remote-tracking branch 'origin/master'
# Conflicts: # package-lock.json # package.json # tsconfig.json
2 parents 548e0d8 + b35ae4b commit ceaa4af

File tree

11 files changed

+200
-16
lines changed

11 files changed

+200
-16
lines changed

.firebaserc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"projects": {
3+
"default": "material-hybrid"
4+
},
25
"targets": {
36
"material-hybrid": {
47
"hosting": {
@@ -8,4 +11,4 @@
811
}
912
}
1013
}
11-
}
14+
}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ speed-measure-plugin.json
3737
/connect.lock
3838
/coverage
3939
/libpeerconnection.log
40-
.log
40+
*.log
4141
yarn-error.log
4242
testem.log
4343
/typings

angular.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"builder": "@angular-devkit/build-angular:browser",
2626
"options": {
2727
"aot": true,
28+
"extractCss": true,
2829
"outputPath": "dist/",
2930
"index": "src/index.html",
3031
"main": "src/main.ts",
@@ -38,6 +39,7 @@
3839
"angular-aria",
3940
"angular-material",
4041
"angular-messages",
42+
"angular-sanitize",
4143
"zone.js/dist/zone-error",
4244
"zone.js/dist/zone"
4345
]

firebase.json

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,69 @@
55
"public": "dist/",
66
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
77
"appAssociation": "AUTO",
8+
"cleanUrls": true,
89
"rewrites": [
910
{
10-
"source": "**",
11+
"source": "/**/!(*.@(js|ts|html|css|json|svg|png|jpg|jpeg|webp|gif|ico|woff2|woff|ttf|webmanifest))",
1112
"destination": "/index.html"
1213
}
13-
]
14+
],
15+
"headers": [
16+
{
17+
"source": "/**(*.@(css|js|json|html|svg))",
18+
"headers": [
19+
{
20+
"key": "X-Content-Type-Options",
21+
"value": "nosniff"
22+
}
23+
]
24+
},
25+
{
26+
"source": "/**",
27+
"headers": [
28+
{
29+
"key": "X-XSS-Protection",
30+
"value": "1"
31+
},
32+
{
33+
"key": "X-Frame-Options",
34+
"value": "DENY"
35+
},
36+
{
37+
"key": "Content-Security-Policy",
38+
"value": "upgrade-insecure-requests; default-src 'self'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src *; media-src 'self'; script-src 'self' 'unsafe-inline' https://*.googleapis.com https://apis.google.com; child-src 'self' blob:; connect-src 'self' https://*.googleapis.com https://fonts.gstatic.com https://apis.google.com;"
39+
}
40+
]
41+
},
42+
{
43+
"source": "/assets/**",
44+
"headers": [
45+
{
46+
"key": "Cache-Control",
47+
"value": "public, max-age=604800, s-maxage=1209600"
48+
}
49+
]
50+
},
51+
{
52+
"source": "/*.@(webmanifest|ico)",
53+
"headers": [
54+
{
55+
"key": "Cache-Control",
56+
"value": "public, max-age=604800, s-maxage=1209600"
57+
}
58+
]
59+
},
60+
{
61+
"source": "/*.@(js|css)",
62+
"headers": [
63+
{
64+
"key": "Cache-Control",
65+
"value": "public, max-age=31536000"
66+
}
67+
]
68+
}
69+
],
70+
"trailingSlash": false
1471
}
1572
]
1673
}

package-lock.json

Lines changed: 115 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
"scripts": {
66
"ng": "ng",
77
"start": "npm run build:templates && ng serve",
8+
"start:static": "firebase serve --only hosting:app",
89
"build:templates": "gulp templates",
910
"watch:templates": "gulp watch",
1011
"build": "npm run build:templates && ng build",
12+
"build:prod": "npm run build:templates && ng build --prod",
1113
"test": "ng test",
1214
"prettier": "prettier --write \"**/*.{js,json,css,scss,less,md,ts,html,component.html}\"",
1315
"lint": "ng lint",
@@ -36,6 +38,7 @@
3638
"angular-aria": "^1.8.0",
3739
"angular-material": "^1.1.23",
3840
"angular-messages": "^1.8.0",
41+
"angular-sanitize": "^1.8.0",
3942
"firebase": "^7.15.5",
4043
"rxjs": "^6.5.5",
4144
"tslib": "^2.0.0",
@@ -50,6 +53,7 @@
5053
"@types/gulp": "^4.0.6",
5154
"@types/node": "^14.0.14",
5255
"codelyzer": "^6.0.0-next.1",
56+
"debug": "^4.1.1",
5357
"firebase-tools": "^8.4.3",
5458
"gulp": "^4.0.2",
5559
"gulp-angular-templatecache": "^3.0.0",

src/app/angularjs/app-angularjs.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import 'angular-animate';
33
import 'angular-aria';
44
import 'angular-messages';
55
import 'angular-material';
6+
import 'angular-sanitize';
67
import './templates/index';
78
import { downgradeComponent, downgradeModule } from '@angular/upgrade/static';
9+
import { environment } from '../../environments/environment';
810
import { AppComponent } from '../angular/app.component';
911
import { appAngularJSComponent } from './app-angularjs.component';
1012
import { versionStampComponent } from './version-stamp.component';
@@ -19,12 +21,13 @@ const configFunction = ($mdThemingProvider, $mdGestureProvider) => {
1921
.primaryPalette('indigo')
2022
.accentPalette('green', { default: '500' })
2123
.backgroundPalette('grey', { default: 'A100' });
24+
$mdThemingProvider.setNonce(`${btoa(environment.version)}`);
2225
$mdGestureProvider.skipClickHijack();
2326
};
2427
configFunction.$inject = ['$mdThemingProvider', '$mdGestureProvider'];
2528

2629
export const appAngularjsModule = angular
27-
.module('AngularJSApp', ['ngMaterial', 'ngMessages', 'templates', downgradedModule])
30+
.module('AngularJSApp', ['ngMaterial', 'ngMessages', 'ngSanitize', 'templates', downgradedModule])
2831
.config(configFunction)
2932
.component(appAngularJSComponent.selector, appAngularJSComponent)
3033
.component(versionStampComponent.selector, versionStampComponent)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import { version } from '../../package.json';
2+
13
export const environment = {
24
production: true,
5+
version,
36
};

0 commit comments

Comments
 (0)