You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/angular/pwa.md
+17-3
Original file line number
Diff line number
Diff line change
@@ -82,19 +82,33 @@ If it's the first time you use firebase-tools, login to your Google account with
82
82
83
83
With the Firebase CLI installed, run `firebase init` within your Ionic project. The CLI prompts:
84
84
85
-
**"Which Firebase CLI features do you want to set up for this folder?"** Choose "Hosting: Configure and deploy Firebase Hosting sites."
85
+
**"Which Firebase CLI features do you want to set up for this folder?"** Choose "Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys".
86
+
87
+
Create a new Firebase project or select an existing one.
86
88
87
89
**"Select a default Firebase project for this directory:"** Choose the project you created on the Firebase website.
88
90
89
91
**"What do you want to use as your public directory?"** Enter "www".
90
92
91
93
:::note
92
-
Answering these next two questions will ensure that routing, hard reload, and deep linking work in the app:
94
+
Answering this next question will ensure that routing, hard reload, and deep linking work in the app:
93
95
:::
94
96
95
97
**Configure as a single-page app (rewrite all urls to /index.html)?"** Enter "Yes".
96
98
97
-
**"File www/index.html already exists. Overwrite?"** Enter "No".
99
+
**"File build/index.html already exists. Overwrite?"** Enter "No".
100
+
101
+
**Set up automatic builds and deploys with Github?** Enter "Yes".
102
+
103
+
**For which GitHub repository would you like to set up a Github Workflow?** Enter your project name.
104
+
105
+
**Set up the workflow to run a build script before every deploy?** Enter "Yes".
106
+
107
+
**What script should be run before every deploy?** Enter `npm ci && npm run build`.
108
+
109
+
**Set up automatic deployment to your sites live channel when a PR is merged?** Enter "Yes".
110
+
111
+
**What is the name of the get hooked branch associated with your sites live channel?** Enter your project's main branch name.
98
112
99
113
A `firebase.json` config file is generated, configuring the app for deployment.
This minimal configuration allows your application to generate the Web Application Manifest and Service Worker on build.
@@ -102,22 +99,40 @@ Next, in a Terminal, install the Firebase CLI:
102
99
npm install -g firebase-tools
103
100
```
104
101
102
+
:::note
103
+
If it's the first time you use firebase-tools, login to your Google account with `firebase login` command.
104
+
:::
105
+
105
106
With the Firebase CLI installed, run `firebase init` within your Ionic project. The CLI prompts:
106
107
107
-
**"Which Firebase CLI features do you want to set up for this folder?"** Choose "Hosting: Configure and deploy Firebase Hosting sites."
108
+
**"Which Firebase CLI features do you want to set up for this folder?"** Choose "Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys".
109
+
110
+
Create a new Firebase project or select an existing one.
108
111
109
112
**"Select a default Firebase project for this directory:"** Choose the project you created on the Firebase website.
110
113
111
114
**"What do you want to use as your public directory?"** Enter "build".
112
115
113
116
:::note
114
-
Answering these next two questions will ensure that routing, hard reload, and deep linking work in the app:
117
+
Answering this next question will ensure that routing, hard reload, and deep linking work in the app:
115
118
:::
116
119
117
120
**Configure as a single-page app (rewrite all urls to /index.html)?"** Enter "Yes".
118
121
119
122
**"File build/index.html already exists. Overwrite?"** Enter "No".
120
123
124
+
**Set up automatic builds and deploys with Github?** Enter "Yes".
125
+
126
+
**For which GitHub repository would you like to set up a Github Workflow?** Enter your project name.
127
+
128
+
**Set up the workflow to run a build script before every deploy?** Enter "Yes".
129
+
130
+
**What script should be run before every deploy?** Enter `npm ci && npm run build`.
131
+
132
+
**Set up automatic deployment to your sites live channel when a PR is merged?** Enter "Yes".
133
+
134
+
**What is the name of the get hooked branch associated with your sites live channel?** Enter your project's main branch name.
135
+
121
136
A `firebase.json` config file is generated, configuring the app for deployment.
122
137
123
138
The last thing needed is to make sure caching headers are being set correctly. To do this, add a `headers` snippet to the `firebase.json` file. The complete `firebase.json` looks like:
Copy file name to clipboardExpand all lines: docs/vue/pwa.md
+21-3
Original file line number
Diff line number
Diff line change
@@ -167,21 +167,39 @@ Next, in a Terminal, install the Firebase CLI:
167
167
npm install -g firebase-tools
168
168
```
169
169
170
+
:::note
171
+
If it's the first time you use firebase-tools, login to your Google account with `firebase login` command.
172
+
:::
173
+
170
174
With the Firebase CLI installed, run `firebase init` within your Ionic project. The CLI prompts:
171
175
172
-
**"Which Firebase CLI features do you want to set up for this folder?"** Choose "Hosting: Configure and deploy Firebase Hosting sites."
176
+
**"Which Firebase CLI features do you want to set up for this folder?"** Choose "Hosting: Configure files for Firebase Hosting and (optionally) set up GitHub Action deploys".
177
+
178
+
Create a new Firebase project or select an existing one.
173
179
174
180
**"Select a default Firebase project for this directory:"** Choose the project you created on the Firebase website.
175
181
176
182
**"What do you want to use as your public directory?"** Enter "dist".
177
183
178
184
:::note
179
-
Answering these next two questions will ensure that routing, hard reload, and deep linking work in the app:
185
+
Answering this next question will ensure that routing, hard reload, and deep linking work in the app:
180
186
:::
181
187
182
188
**Configure as a single-page app (rewrite all urls to /index.html)?"** Enter "Yes".
183
189
184
-
**"File dist/index.html already exists. Overwrite?"** Enter "No".
190
+
**"File build/index.html already exists. Overwrite?"** Enter "No".
191
+
192
+
**Set up automatic builds and deploys with Github?** Enter "Yes".
193
+
194
+
**For which GitHub repository would you like to set up a Github Workflow?** Enter your project name.
195
+
196
+
**Set up the workflow to run a build script before every deploy?** Enter "Yes".
197
+
198
+
**What script should be run before every deploy?** Enter `npm ci && npm run build`.
199
+
200
+
**Set up automatic deployment to your sites live channel when a PR is merged?** Enter "Yes".
201
+
202
+
**What is the name of the get hooked branch associated with your sites live channel?** Enter your project's main branch name.
185
203
186
204
A `firebase.json` config file is generated, configuring the app for deployment.
0 commit comments