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
[Add Firebase to your JavaScript Project](https://firebase.google.com/docs/web/setup).
@@ -113,6 +112,26 @@ database. When prompted to select the set of initial security rules, select
113
112
any option (e.g. "Start in Production Mode") since these permission settings
114
113
will be overwritten below.
115
114
115
+
#### Storage Setup
116
+
117
+
Visit the "Storage" section of the console and create a storage bucket. In
118
+
order to run the tests, you will need to update your bucket's CORS rules.
119
+
120
+
1. Create a new file called `cors.json` with the contents:
121
+
```json
122
+
[
123
+
{
124
+
"origin": ["http://localhost:8089"],
125
+
"method": ["GET"],
126
+
"maxAgeSeconds": 3600
127
+
}
128
+
]
129
+
```
130
+
2. Install `gsutil` from https://cloud.google.com/storage/docs/gsutil_install
131
+
3. Run `gsutil cors set cors.json gs://<your-cloud-storage-bucket>`
132
+
133
+
For more information, visit https://firebase.google.com/docs/storage/web/download-files#cors_configuration
134
+
116
135
#### Authentication Support
117
136
118
137
Visit the authentication config in your project and enable the `Anonymous`
@@ -171,14 +190,16 @@ scope](https://www.npmjs.com/search?q=scope%3Afirebase) on NPM.
171
190
172
191
### Testing the SDK Locally
173
192
174
-
Please be sure to build your repo before proceeding any further.
193
+
Please be sure your product's package has been built before proceeding any further. (If you haven't built this repo before, make sure to run `yarn build` at the root)
175
194
In order to manually test your SDK changes locally, you must use [yarn link](https://classic.yarnpkg.com/en/docs/cli/link):
176
195
177
196
```shell
178
197
$ cd packages/firebase
179
198
$ yarn link # initialize the linking to the other folder
180
-
$ cd ../<my-test-app-dir># cd into your personal project directory
181
-
$ yarn link firebase # tell yarn to use the locally built firebase SDK instead
199
+
$ cd ../packages/<my-product># Example: $ cd packages/database
200
+
$ yarn link # link your product to make it available elsewhere
201
+
$ cd<my-test-app-dir># cd into your personal project directory
202
+
$ yarn link firebase @firebase/<my-product># tell yarn to use the locally built firebase SDK instead
182
203
```
183
204
184
205
This will create a symlink and point your `<my-test-app-dir>` to the locally built version of the firebase SDK.
0 commit comments