File tree 4 files changed +1
-8
lines changed
4 files changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -13,9 +13,7 @@ Executing the command mentioned above will perform the following actions:
13
13
1 . Adds [ ` @angular/service-worker ` ] ( https://npmjs.com/@angular/service-worker ) as a dependency to your project.
14
14
1 . Enables service worker builds in the Angular CLI.
15
15
1 . Imports and registers the service worker in the application module.
16
- 1 . Updates the ` index.html ` file:
17
- - Includes a link to add the [ manifest.webmanifest] ( https://developer.mozilla.org/en-US/docs/Web/Manifest ) file.
18
- - Adds a meta tag for ` theme-color ` .
16
+ 1 . Updates the ` index.html ` file to inlclude a link to add the [ manifest.webmanifest] ( https://developer.mozilla.org/en-US/docs/Web/Manifest ) file.
19
17
1 . Installs icon files to support the installed Progressive Web App (PWA).
20
18
1 . Creates the service worker configuration file called ` ngsw-config.json ` , specifying caching behaviors and other settings.
21
19
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " <%= title %>" ,
3
3
"short_name" : " <%= title %>" ,
4
- "theme_color" : " #1976d2" ,
5
- "background_color" : " #fafafa" ,
6
4
"display" : " standalone" ,
7
5
"scope" : " ./" ,
8
6
"start_url" : " ./" ,
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ function updateIndexFile(path: string): Rule {
45
45
rewriter . on ( 'endTag' , ( endTag ) => {
46
46
if ( endTag . tagName === 'head' ) {
47
47
rewriter . emitRaw ( ' <link rel="manifest" href="manifest.webmanifest">\n' ) ;
48
- rewriter . emitRaw ( ' <meta name="theme-color" content="#1976d2">\n' ) ;
49
48
} else if ( endTag . tagName === 'body' && needsNoScript ) {
50
49
rewriter . emitRaw (
51
50
' <noscript>Please enable JavaScript to continue using this application.</noscript>\n' ,
Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ describe('PWA Schematic', () => {
112
112
const content = tree . readContent ( 'projects/bar/src/index.html' ) ;
113
113
114
114
expect ( content ) . toMatch ( / < l i n k r e l = " m a n i f e s t " h r e f = " m a n i f e s t .w e b m a n i f e s t " > / ) ;
115
- expect ( content ) . toMatch ( / < m e t a n a m e = " t h e m e - c o l o r " c o n t e n t = " # 1 9 7 6 d 2 " > / ) ;
116
115
expect ( content ) . toMatch (
117
116
/ < n o s c r i p t > P l e a s e e n a b l e J a v a S c r i p t t o c o n t i n u e u s i n g t h i s a p p l i c a t i o n .< \/ n o s c r i p t > / ,
118
117
) ;
@@ -127,7 +126,6 @@ describe('PWA Schematic', () => {
127
126
const content = tree . readContent ( 'projects/bar/src/index.html' ) ;
128
127
129
128
expect ( content ) . toMatch ( / < l i n k r e l = " m a n i f e s t " h r e f = " m a n i f e s t .w e b m a n i f e s t " > / ) ;
130
- expect ( content ) . toMatch ( / < m e t a n a m e = " t h e m e - c o l o r " c o n t e n t = " # 1 9 7 6 d 2 " > / ) ;
131
129
expect ( content ) . not . toMatch (
132
130
/ < n o s c r i p t > P l e a s e e n a b l e J a v a S c r i p t t o c o n t i n u e u s i n g t h i s a p p l i c a t i o n .< \/ n o s c r i p t > / ,
133
131
) ;
You can’t perform that action at this time.
0 commit comments