@angular/pwa 18.0.1 → 18.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/pwa",
3
- "version": "18.0.1",
3
+ "version": "18.0.3",
4
4
  "description": "PWA schematics for Angular",
5
5
  "keywords": [
6
6
  "Angular CLI",
@@ -17,8 +17,8 @@
17
17
  "save": false
18
18
  },
19
19
  "dependencies": {
20
- "@angular-devkit/schematics": "18.0.1",
21
- "@schematics/angular": "18.0.1",
20
+ "@angular-devkit/schematics": "18.0.3",
21
+ "@schematics/angular": "18.0.3",
22
22
  "parse5-html-rewriting-stream": "7.0.0"
23
23
  },
24
24
  "peerDependencies": {
@@ -8,49 +8,49 @@
8
8
  "start_url": "./",
9
9
  "icons": [
10
10
  {
11
- "src": "assets/icons/icon-72x72.png",
11
+ "src": "<%= iconsPath %>/icon-72x72.png",
12
12
  "sizes": "72x72",
13
13
  "type": "image/png",
14
14
  "purpose": "maskable any"
15
15
  },
16
16
  {
17
- "src": "assets/icons/icon-96x96.png",
17
+ "src": "<%= iconsPath %>/icon-96x96.png",
18
18
  "sizes": "96x96",
19
19
  "type": "image/png",
20
20
  "purpose": "maskable any"
21
21
  },
22
22
  {
23
- "src": "assets/icons/icon-128x128.png",
23
+ "src": "<%= iconsPath %>/icon-128x128.png",
24
24
  "sizes": "128x128",
25
25
  "type": "image/png",
26
26
  "purpose": "maskable any"
27
27
  },
28
28
  {
29
- "src": "assets/icons/icon-144x144.png",
29
+ "src": "<%= iconsPath %>/icon-144x144.png",
30
30
  "sizes": "144x144",
31
31
  "type": "image/png",
32
32
  "purpose": "maskable any"
33
33
  },
34
34
  {
35
- "src": "assets/icons/icon-152x152.png",
35
+ "src": "<%= iconsPath %>/icon-152x152.png",
36
36
  "sizes": "152x152",
37
37
  "type": "image/png",
38
38
  "purpose": "maskable any"
39
39
  },
40
40
  {
41
- "src": "assets/icons/icon-192x192.png",
41
+ "src": "<%= iconsPath %>/icon-192x192.png",
42
42
  "sizes": "192x192",
43
43
  "type": "image/png",
44
44
  "purpose": "maskable any"
45
45
  },
46
46
  {
47
- "src": "assets/icons/icon-384x384.png",
47
+ "src": "<%= iconsPath %>/icon-384x384.png",
48
48
  "sizes": "384x384",
49
49
  "type": "image/png",
50
50
  "purpose": "maskable any"
51
51
  },
52
52
  {
53
- "src": "assets/icons/icon-512x512.png",
53
+ "src": "<%= iconsPath %>/icon-512x512.png",
54
54
  "sizes": "512x512",
55
55
  "type": "image/png",
56
56
  "purpose": "maskable any"
package/pwa/index.js CHANGED
@@ -95,6 +95,7 @@ function default_1(options) {
95
95
  const { title, ...swOptions } = options;
96
96
  await (0, utility_1.writeWorkspace)(host, workspace);
97
97
  let assetsDir = path_1.posix.join(sourcePath, 'assets');
98
+ let iconsPath;
98
99
  if (host.exists(assetsDir)) {
99
100
  // Add manifest to asset configuration
100
101
  const assetEntry = path_1.posix.join(project.sourceRoot ?? path_1.posix.join(project.root, 'src'), 'manifest.webmanifest');
@@ -111,13 +112,15 @@ function default_1(options) {
111
112
  target.options = { assets: [assetEntry] };
112
113
  }
113
114
  }
115
+ iconsPath = 'assets';
114
116
  }
115
117
  else {
116
118
  assetsDir = path_1.posix.join(project.root, 'public');
119
+ iconsPath = 'icons';
117
120
  }
118
121
  return (0, schematics_1.chain)([
119
122
  (0, schematics_1.externalSchematic)('@schematics/angular', 'service-worker', swOptions),
120
- (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files/assets'), [(0, schematics_1.template)({ ...options }), (0, schematics_1.move)(assetsDir)])),
123
+ (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files/assets'), [(0, schematics_1.template)({ ...options, iconsPath }), (0, schematics_1.move)(assetsDir)])),
121
124
  ...[...indexFiles].map((path) => updateIndexFile(path)),
122
125
  ]);
123
126
  };