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
Copy file name to clipboardexpand all lines: README.md
+17-32
Original file line number
Diff line number
Diff line change
@@ -2,28 +2,6 @@
2
2
You can use TypeORM in connection with the `cordova-sqlite-storage` plugin in your Ionic app.
3
3
This project demonstrates how that would work.
4
4
5
-
## TypeORM >= 0.1.7
6
-
To support webpack builds outside of Ionic we had to remove the automatic selection of the correct TypeORM version (the `typeorm` package comes with a Node and a browser version). In order to keep using TypeORM with Ionic you have to create a custom `webpack.config.js` file. This example contains one that is identical to the one Ionic uses when no config file is specified but adds the `NormalModuleReplacementPlugin` to select the correct version.
7
-
If you already have a custom webpack config file you have to add these lines to your plugins (for both development and production):
8
-
9
-
```js
10
-
plugins: [
11
-
...,
12
-
newwebpack.NormalModuleReplacementPlugin(/typeorm$/, function (result) {
If you don't use a custom wepack config, copy the one from this example and add it to your `package.json` under `config`:
21
-
```json
22
-
"config": {
23
-
"ionic_webpack": "./config/webpack.config.js"
24
-
}
25
-
```
26
-
27
5
## Installation
28
6
29
7
To run this example in production or development mode you have to make sure, `ionic` and `cordova` are installed globally on your machine. After that you can install all necessary dependencies for running this example.
@@ -38,26 +16,25 @@ npm -v
38
16
npm install -g cordova ionic
39
17
```
40
18
41
-
2. Install all dependencies listed in [`package.json`](/package.json#L15-L47).
19
+
2. Install all dependencies listed in [`package.json`](/package.json).
42
20
```bash
43
21
npm install
44
22
```
45
23
46
-
### Run app in development mode
47
-
3. Run the app in your browser:
24
+
### Running the example in your browser
48
25
```bash
49
26
ionic serve
50
27
```
51
28
52
-
### Run app in production mode
53
-
3. Add an iOS or Android platform to your project:
29
+
### Running the example on your device
30
+
3. Add an iOS or Android to the project.
54
31
```bash
55
32
ionic cordova platform add ios
56
33
# or
57
34
ionic cordova platform add android
58
35
```
59
36
60
-
4. Run the app on your device:
37
+
4. Run the app on your device.
61
38
```bash
62
39
ionic cordova run ios
63
40
# or
@@ -66,15 +43,23 @@ ionic cordova run android
66
43
67
44
*For further information please read [ionic's deployment guide](https://ionicframework.com/docs/intro/deploying/).*
68
45
69
-
70
46

71
47
72
48
### Using TypeORM in your own app
73
-
1. Install the plugin: `ionic cordova plugin add cordova-sqlite-storage --save`
0 commit comments