Skip to content

Commit cf80d27

Browse files
committed
Update README
1 parent 6e8db70 commit cf80d27

File tree

1 file changed

+38
-6
lines changed

1 file changed

+38
-6
lines changed

README.md

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,19 @@ This package provides a complete Dart implementation of Firebase Cloud Functions
2929
- **Error Handling**: Built-in typed error classes matching the Node.js SDK
3030
- **Hot Reload**: Fast development with build_runner watch
3131

32+
## Prerequisites
33+
34+
- Dart SDK >=3.0.0
35+
- Custom Firebase CLI with Dart runtime support:
36+
37+
```bash
38+
git clone -b @invertase/dart https://github.com/invertase/firebase-tools.git
39+
cd firebase-tools
40+
npm install
41+
npm run build
42+
npm link
43+
```
44+
3245
## Installation
3346

3447
Add to your `pubspec.yaml`:
@@ -388,12 +401,36 @@ firebase.https.onRequest(
388401
);
389402
```
390403

404+
## Project Configuration
405+
406+
Your `firebase.json` must specify the Dart runtime:
407+
408+
```json
409+
{
410+
"functions": [
411+
{
412+
"source": ".",
413+
"codebase": "default",
414+
"runtime": "dart3"
415+
}
416+
],
417+
"emulators": {
418+
"functions": { "port": 5001 },
419+
"firestore": { "port": 8080 },
420+
"database": { "port": 9000 },
421+
"auth": { "port": 9099 },
422+
"pubsub": { "port": 8085 },
423+
"ui": { "enabled": true, "port": 4000 }
424+
}
425+
}
426+
```
427+
391428
## Development
392429

393430
### Running the Emulator
394431

395432
```bash
396-
firebase emulators:start --only functions
433+
firebase emulators:start
397434
```
398435

399436
### Building
@@ -431,11 +468,6 @@ See [Testing Guide](test/snapshots/README.md) for more details.
431468
- [Pub/Sub Triggers](docs/pubsub-triggers.md)
432469
- [Architecture](docs/architecture.md)
433470

434-
## Requirements
435-
436-
- Dart SDK >=3.0.0
437-
- Firebase CLI with Dart runtime support
438-
439471
## License
440472

441473
Apache 2.0

0 commit comments

Comments
 (0)