ionic-sqlite-typeorm-app
Ionic/Angular application demonstrating the use of the
@capacitor-community/sqlite
with the TypeORM ORM
this app uses Capacitor 4
| Maintainer | GitHub | Social |
|---|---|---|
| Quéau Jean Pierre | jepiqueau |
To start building your App using this App, clone this repo to a new directory:
git clone https://github.com/jepiqueau/ionic-sqlite-typeorm-app.git
cd ionic-sqlite-typeorm-app
git remote rm origin- then install it
npm install
- if you use the Electron platform
npm run electron:install- the capacitor config parameters are:
"appId": "com.jeep.app.ionic.angular.typeorm",
"appName": "ionic-sqlite-typeorm-app",
- the
terser-webpack-pluginhas been installed and acustom.webpack.config.jsfile has been added to be able to use the migration.
var webpack = require('webpack');
var TerserPlugin = require('terser-webpack-plugin')
console.log('The custom config is used');
module.exports = {
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
keep_fnames: true,
},
}),
],
},
plugins: [
new webpack.NormalModuleReplacementPlugin(/typeorm$/, function (result) {
result.request = result.request.replace(/typeorm/, "typeorm/browser");
})
],
};-
the
angular.jsonhas been modified- replacing
"architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "www",
- by
"architect": { "build": { "builder": "@angular-builders/custom-webpack:browser", "options": { "customWebpackConfig": { "path": "./custom.webpack.config.js" }, "allowedCommonJsDependencies": [ "debug", "buffer", "sha.js" ], "outputPath": "www",
- and
"serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "app:build" },
- by
"serve": { "builder": "@angular-builders/custom-webpack:dev-server", "options": { "browserTarget": "app:build" },
-
development
- angular cli
npm run start
- ionic cli
ionic serve
-
production
npm run build:webnpm run build:native
npx cap sync
npx cap copynpx cap open androidOnce Android Studio launches, make sure that you are using
- Gradle JDK version 11
- Android Gradle Plugin Version 7.2.2
and build your app through the standard Android Studio workflow.
npx cap open iosOnce Xcode launches, you can build your app through the standard Xcode workflow.
npm run ionic:androidOnce Android Studio launches, make sure that you are using
- Gradle JDK version 11
- Android Gradle Plugin Version 7.2.2
and build your app through the standard Android Studio workflow.
npm run ionic:iosOnce Xcode launches, you can build your app through the standard Xcode workflow.
npm run electron:startThanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
