Please remember to constribute and fork TypeORM for any issues that are not in the WebSQL and SQLite driver; once accepted over there, Ionic-ORM will pull the changes.
The Reason why Ionic-ORM has to be seperate is because TypeORM is a module that is primary meant to be ran on a server side application and not a client; we are taking advantage of their amazing SQL builder and ORM abilities done in typescript.
This document describes how to set up your development environment and run Ionic-ORM test cases.
See the contribution guidelines if you'd like to contribute to Angular.
Before you can build and test TypeORM, you must install and configure the following products on your development machine:
-
Git and/or the GitHub app (for Mac or Windows); GitHub's Guide to Installing Git is a good source of information.
-
Node.js, (better to install latest version) which is used to run a development web server, run tests, and generate distributable files. Depending on your system, you can install Node either from source or as a pre-packaged bundle.
Fork and clone the repository:
- Login to your GitHub account or create one by following the instructions given here.
- Fork the main TypeORM repository.
- Clone your fork of the TypeORM repository and define an
upstream
remote pointing back to the TypeORM repository that you forked in the first place.
# Clone your GitHub repository:
git clone git@github.com:<github username>/ionic-orm.git
# Go to the TypeORM directory:
cd ionic-orm
# Add the main TyepORM repository as an upstream remote to your repository:
git remote add upstream https://github.com/ionic-orm/ionic-orm.git
Install all TypeORM dependencies by running this command:
npm install
During installation you may have some probelems with some dependencies. For example to proper install oracle driver you need to follow all instructions from node-oracle documentation.
Also install typescript globally:
npm install -g typescript
(you might need to prefix this command withsudo
)
To build a distribution package of Ionic-ORM run:
tsc
This command will generate you a distribution package in the dist/
directory.
You can link (or simply copy/paste) this directory into your project and test TypeORM there
(but make sure to keep all node_modules required by TypeORM).