Skip to content

Commit fb67f76

Browse files
Merge pull request #112 from vuejs/dev
Create a new pull request by comparing changes across two branches
2 parents d892f57 + 3c286d6 commit fb67f76

File tree

3 files changed

+62
-180
lines changed

3 files changed

+62
-180
lines changed

docs/core-plugins/pwa.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,30 @@ file, or the `"vue"` field in `package.json`.
8383
- start_url: `'.'`
8484
- display: `'standalone'`
8585
- theme_color: `pwa.themeColor`
86+
- icons: `[
87+
{
88+
'src': './img/icons/android-chrome-192x192.png',
89+
'sizes': '192x192',
90+
'type': 'image/png'
91+
},
92+
{
93+
'src': './img/icons/android-chrome-512x512.png',
94+
'sizes': '512x512',
95+
'type': 'image/png'
96+
},
97+
{
98+
'src': './img/icons/android-chrome-maskable-192x192.png',
99+
'sizes': '192x192',
100+
'type': 'image/png',
101+
'purpose': 'maskable'
102+
},
103+
{
104+
'src': './img/icons/android-chrome-maskable-512x512.png',
105+
'sizes': '512x512',
106+
'type': 'image/png',
107+
'purpose': 'maskable'
108+
}
109+
]`
86110

87111
- **pwa.iconPaths**
88112

@@ -100,6 +124,8 @@ file, or the `"vue"` field in `package.json`.
100124

101125
Change these values to use different paths for your icons.
102126

127+
*NOTE:* These icons are only used to generate the meta tags in the `<head>` of your HTML doc. To change the icon paths for your manifest please use `pwa.manifestOptions.icons`
128+
103129
### Example Configuration
104130

105131
```js
Lines changed: 2 additions & 148 deletions
Loading

packages/@vue/cli-shared-utils/lib/openChrome.applescript

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,45 @@ property targetWindow: null
1313
on run argv
1414
set theURL to item 1 of argv
1515

16-
tell application "Chrome"
16+
with timeout of 2 seconds
17+
tell application "Chrome"
1718

18-
if (count every window) = 0 then
19-
make new window
20-
end if
19+
if (count every window) = 0 then
20+
make new window
21+
end if
2122

22-
-- 1: Looking for tab running debugger
23-
-- then, Reload debugging tab if found
24-
-- then return
25-
set found to my lookupTabWithUrl(theURL)
26-
if found then
27-
set targetWindow's active tab index to targetTabIndex
28-
tell targetTab to reload
29-
tell targetWindow to activate
30-
set index of targetWindow to 1
31-
return
32-
end if
23+
-- 1: Looking for tab running debugger
24+
-- then, Reload debugging tab if found
25+
-- then return
26+
set found to my lookupTabWithUrl(theURL)
27+
if found then
28+
set targetWindow's active tab index to targetTabIndex
29+
tell targetTab to reload
30+
tell targetWindow to activate
31+
set index of targetWindow to 1
32+
return
33+
end if
3334

34-
-- 2: Looking for Empty tab
35-
-- In case debugging tab was not found
36-
-- We try to find an empty tab instead
37-
set found to my lookupTabWithUrl("chrome://newtab/")
38-
if found then
39-
set targetWindow's active tab index to targetTabIndex
40-
set URL of targetTab to theURL
41-
tell targetWindow to activate
42-
return
43-
end if
35+
-- 2: Looking for Empty tab
36+
-- In case debugging tab was not found
37+
-- We try to find an empty tab instead
38+
set found to my lookupTabWithUrl("chrome://newtab/")
39+
if found then
40+
set targetWindow's active tab index to targetTabIndex
41+
set URL of targetTab to theURL
42+
tell targetWindow to activate
43+
return
44+
end if
4445

45-
-- 3: Create new tab
46-
-- both debugging and empty tab were not found
47-
-- make a new tab with url
48-
tell window 1
49-
activate
50-
make new tab with properties {URL:theURL}
46+
-- 3: Create new tab
47+
-- both debugging and empty tab were not found
48+
-- make a new tab with url
49+
tell window 1
50+
activate
51+
make new tab with properties {URL:theURL}
52+
end tell
5153
end tell
52-
end tell
54+
end timeout
5355
end run
5456

5557
-- Function:

0 commit comments

Comments
 (0)