Skip to content

Commit b359b68

Browse files
committed
docs(installation): install instructions added to README.md
1 parent bc6bea4 commit b359b68

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,32 @@ This package is bundled into one module with 0 dependencies, and is designed to
99
reliable/redundant as possible. Suitable for production use in almost any project. Only one feature is available in this
1010
package to keep the bundle size as small as possible for performance reasons.
1111

12+
## Installation
13+
14+
Simply install from NPM:
15+
16+
```sh
17+
npm install better-firebase-functions
18+
```
19+
20+
1. Ensure your main entry point file contains only:
21+
22+
```typescript
23+
// src/index.ts
24+
import { exportFunctions } from 'better-firebase-functions';
25+
26+
exportFunctions({ __filename, exports });
27+
```
28+
29+
2. Ensure your function triggers are structured like this:
30+
31+
```typescript
32+
// src/auth/on-create.ts
33+
import * as functions from 'firebase-functions';
34+
35+
export default functions.auth.user().onCreate(/* Function */);
36+
```
37+
1238
## exportFunctions()
1339

1440
This function has two main features:

0 commit comments

Comments
 (0)