Skip to content

Commit 48c26ea

Browse files
committed
Update documentation
1 parent f3294da commit 48c26ea

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

projects/ionic-typeorm/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## Installation
44

5-
Follow [install steps](installs.md) for installing `@rareloop/ionic-typeorm`
5+
Follow [install steps](./docs/install.md) for installing `@rareloop/ionic-typeorm`
66

77
An example Ionic project can be found [in the example project](../example/README.md)
88

99
</br>
1010

1111
## Testing
1212

13-
Follow [unit testing config](./installs.md) for additional changes to allow karma to run unit tests with `typeorm`
13+
Follow [unit testing config](./docs/testing.md) for additional changes to allow karma to run unit tests with `typeorm`
1414

1515
</br>
1616

@@ -136,7 +136,7 @@ export interface IDBService<T extends BaseEntity> {
136136

137137
</br>
138138

139-
## Migrations
139+
## Auto-Migrations
140140

141141
Add the following npm scripts to provide migration commands.
142142

projects/ionic-typeorm/docs/install.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
# Ionic Typeorm Installation
22

3+
Install the library and it's dependencies.
4+
35
``` sh
46
npm install --save @rareloop/ionic-typeorm
57
```
68

7-
Install peer dependencies
8-
99
``` sh
1010
npm install --save typeorm sql.js
1111
npm install --save-dev @angular-builders/custom-webpack
1212
```
1313

14+
To allow the `typeorm` entity decorations we require an extra compiler option.
15+
We also fix a bug where `react-native-sqlite-storage` is not defined by pointing it at a shim.
16+
1417
In `tsconfig.json`:
1518

1619
``` json
@@ -23,6 +26,8 @@ In `tsconfig.json`:
2326
},
2427
```
2528

29+
Update the tsconfig to use `node` types and to include our shim file.
30+
2631
and `tsconfig.app.json`
2732

2833
``` json
@@ -43,6 +48,8 @@ and `tsconfig.app.json`
4348
}
4449
```
4550

51+
In order to build `typeorm` correctly we require a `custom-webpack` builder so update the `angular.json` to do this.
52+
4653
In `angular.json`
4754

4855
``` json
@@ -72,12 +79,3 @@ In `angular.json`
7279
}
7380
}
7481
```
75-
76-
Add the following scripts for use for migrations
77-
78-
``` JSON
79-
"scripts": {
80-
"migration:create": "npx ionic-typeorm-create",
81-
"migration:generate": "npx ionic-typeorm-generate"
82-
}
83-
```

projects/ionic-typeorm/docs/testing.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Ionic Typeorm Testing Configuration
22

3+
An issue with `sql.js:1.5.0` means it doesn't work nicely with karma. In order to work around this an older copy of `sql.js` is included instead for unit testing.
4+
35
For unit tests: `karma.conf.js`
46

57
``` javascript

projects/ionic-typeorm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rareloop/ionic-typeorm",
3-
"version": "0.0.16",
3+
"version": "0.0.17",
44
"description": "",
55
"license": "MIT",
66
"author": "Rareloop",

0 commit comments

Comments
 (0)