-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #252 from gregfenton/patch-1
Minor grammar & wording consistency fixes
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
[![License](https://img.shields.io/npm/l/fireorm.svg?style=flat)](https://www.npmjs.com/package/fireorm) | ||
[![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/fireorm/community) | ||
|
||
Fireorm is a tiny wrapper on top of firebase-admin that makes life easier when dealing with a Firestore database. Fireorm tries to ease the development of apps that rely on Firestore at the database layer by abstracting the access layer providing and familiar repository pattern. It basically helps us not worrying about Firestore details and focusing in what matters: adding cool new features! | ||
Fireorm is a tiny wrapper on top of firebase-admin that makes life easier when dealing with a Firestore database. Fireorm tries to ease the development of apps that rely on Firestore at the database layer by abstracting the access layer providing a familiar repository pattern. It basically helps us not worry about Firestore details and focus on what matters: adding cool new features! | ||
|
||
You can read more about the motivations and features of fireorm [on its introductory post](https://medium.com/p/ba7734644684). Also, the [API documentation](https://wovalle.github.io/fireorm) is available. | ||
|
||
|
@@ -18,10 +18,10 @@ You can read more about the motivations and features of fireorm [on its introduc | |
```bash | ||
yarn add fireorm reflect-metadata #or npm install fireorm reflect-metadata | ||
|
||
# note: reflect-metadata shim is required | ||
# note: the reflect-metadata shim is required | ||
``` | ||
|
||
2. [Initialize](https://firebase.google.com/docs/firestore/quickstart#initialize) your firestore application: | ||
2. [Initialize](https://firebase.google.com/docs/firestore/quickstart#initialize) your Firestore application: | ||
|
||
```typescript | ||
import * as admin from 'firebase-admin'; | ||
|
@@ -38,7 +38,7 @@ const firestore = admin.firestore(); | |
fireorm.initialize(firestore); | ||
``` | ||
|
||
3. Create your firestore models! | ||
3. Create your Firestore models: | ||
|
||
```typescript | ||
import { Collection } from 'fireorm'; | ||
|
@@ -77,7 +77,7 @@ await todoRepository.delete(mySuperTodoDocument.id); // Delete todo | |
|
||
### Firebase Complex Data Types | ||
|
||
Firestore has support for [complex data types](https://firebase.google.com/docs/firestore/manage-data/data-types) such as GeoPoint and Reference. Full handling of complex data types is [being handled in this issue](https://github.com/wovalle/fireorm/issues/58). Temporarily, Fireorm will export [Class Transformer's @Type](https://github.com/typestack/class-transformer#working-with-nested-objects) decorator. It receives a lamda where you have to return the type you want to cast to. [See GeoPoint Example](https://github.com/wovalle/fireorm/blob/d8f79090b7006675f2cb5014bb5ca7a9dfbfa8c1/src/BaseFirestoreRepository.spec.ts#L471-L476). | ||
Firestore has support for [complex data types](https://firebase.google.com/docs/firestore/manage-data/data-types) such as GeoPoint and Reference. Full handling of complex data types is [being handled in this issue](https://github.com/wovalle/fireorm/issues/58). Temporarily, fireorm will export [Class Transformer's @Type](https://github.com/typestack/class-transformer#working-with-nested-objects) decorator. It receives a lamda where you return the type you want to cast to. [See GeoPoint Example](https://github.com/wovalle/fireorm/blob/d8f79090b7006675f2cb5014bb5ca7a9dfbfa8c1/src/BaseFirestoreRepository.spec.ts#L471-L476). | ||
|
||
#### Limitations | ||
|
||
|
@@ -93,7 +93,7 @@ If you want to cast GeoPoints to your custom class, it must have `latitude: numb | |
git clone [email protected]:wovalle/fireorm.git | ||
``` | ||
|
||
2. Install the dependencies. | ||
2. Install the dependencies: | ||
|
||
```bash | ||
yarn # npm install | ||
|
@@ -106,7 +106,7 @@ Fireorm has two types of tests: | |
- Unit tests: `yarn test # or npm test` | ||
- Integration tests: `yarn test:integration # or npm test:integration` | ||
|
||
To be able to run the integration tests you'll need to [create a firebase service account](https://firebase.google.com/docs/admin/setup#initialize_the_sdk) and declare some [environment variables](https://github.com/wovalle/fireorm/blob/master/test/setup.ts#L5-L13). | ||
To be able to run the integration tests you need to [create a Firebase service account](https://firebase.google.com/docs/admin/setup#initialize_the_sdk) and declare some [environment variables](https://github.com/wovalle/fireorm/blob/master/test/setup.ts#L5-L13). | ||
|
||
Test files must follow the naming convention `*.test.ts` and use [jest](https://jestjs.io/) as the test runner. | ||
|
||
|
@@ -148,7 +148,7 @@ git push --follow-tags | |
npm publish | ||
``` | ||
|
||
- To deploy the documentation | ||
- To deploy the documentation: | ||
|
||
```bash | ||
yarn deploy:doc # or npm deploy:doc | ||
|