Skip to content

Commit 04d1a94

Browse files
committed
Week 1
1 parent a0238e4 commit 04d1a94

File tree

90 files changed

+54295
-100600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+54295
-100600
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# misc
2+
.DS_Store

Govt-Billing-React/.browserslistrc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Chrome >=79
2+
ChromeAndroid >=79
3+
Firefox >=70
4+
Edge >=79
5+
Safari >=14
6+
iOS >=14

Govt-Billing-React/.env.example

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
VITE_FIREBASE_VITE_APP_TITLE="firebase app title"
2+
VITE_FIREBASE_API_KEY="firebase_key"
3+
VITE_FIREBASE_AUTH_DOMAIN="domain_name.firebaseapp.com"
4+
VITE_FIREBASE_PROJECT_ID="project_id"
5+
VITE_FIREBASE_STORAGE_BUCKET="storage_bucket"
6+
VITE_FIREBASE_MESSAGING_SENDER_ID="sender_id"
7+
VITE_FIREBASE_APP_ID="firebase_app_id"

Govt-Billing-React/.eslintrc.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
node: true
5+
},
6+
'extends': [
7+
'plugin:react/recommended',
8+
'eslint:recommended'
9+
],
10+
parserOptions: {
11+
ecmaVersion: 2020
12+
},
13+
rules: {
14+
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
15+
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
16+
}
17+
}

Govt-Billing-React/.gitignore

+8-2
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@
99
/coverage
1010

1111
# production
12-
/build
12+
/dist
1313

1414
# misc
1515
.DS_Store
16+
.env
1617
.env.local
1718
.env.development.local
1819
.env.test.local
1920
.env.production.local
20-
.vscode
21+
/.vscode/*
22+
!/.vscode/extensions.json
23+
.idea
2124

2225
npm-debug.log*
2326
yarn-debug.log*
2427
yarn-error.log*
28+
29+
# Optional eslint cache
30+
.eslintcache
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ionic.ionic"
4+
]
5+
}

Govt-Billing-React/LICENSE

-21
This file was deleted.

Govt-Billing-React/README.md

+101-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,101 @@
1-
1. npm i -g @ionic/cli
2-
2. git clone https://github.com/geetanshu2502/ionicReactApp
3-
3. cd ionicReactApp
4-
4. npm install
5-
5. ionic serve (With tis you can access the app in browser)
6-
6. ionic capacitor open android(opens android studio with the application, build and run)
1+
# Project Migration and Fixes
2+
3+
This project involves the migration of an Ionic v5 app with outdated dependencies to Ionic v7 using Vite as the build tool. The process included transferring code and addressing various issues encountered during the migration.
4+
5+
## Migration Steps
6+
7+
- Create a new Ionic Vite app:
8+
9+
```bash
10+
npx create-ionic-vite@latest
11+
```
12+
13+
- Transfer code from the original Ionic v5 project to the new Vite-based project.
14+
15+
- Fix errors encountered during the migration process by addressing them one by one.
16+
17+
## Integration of SocialCalc
18+
19+
During the integration of SocialCalc, an issue arose when switching from UMD to ES6 imports. Although the code worked on the web, it failed on an Android emulator due to the unavailability of the window object.
20+
21+
To resolve this, the UMD module was re-implemented, and the window object was defined in the SocialCalc file. Additionally, the SocialCalc file's outdated code lacked variable declarations. To make these variables available at the top of the scope, the var keyword was used.
22+
23+
## Android Emulator Compatibility Fix
24+
25+
To make the project compatible with an Android emulator, ensure that variables are declared at the top of the scope in the SocialCalc file. This step is essential for addressing issues related to the unavailability of the window object on the Android platform.
26+
27+
## Running the Project on Web
28+
29+
To build an APK from the codebase, follow these steps:
30+
31+
- Install Node.js if not already installed.
32+
33+
- Clone the repository:
34+
35+
```bash
36+
git clone REPO_URL
37+
```
38+
39+
- Navigate to the project directory:
40+
41+
```bash
42+
cd REPO_NAME
43+
```
44+
45+
- Install project dependencies:
46+
47+
```bash
48+
npm install
49+
```
50+
51+
- Install the Ionic CLI globally:
52+
53+
```bash
54+
npm install -g @ionic/cli
55+
```
56+
57+
- Setup a firebase project and add the firebase configuration in the `.env` file in the format given in the `.env.example`
58+
59+
- Serve the application:
60+
61+
```bash
62+
ionic serve
63+
```
64+
65+
These steps will set up the project and allow you to test it in a development environment.
66+
67+
## Running the Project on Android Device
68+
69+
- Install Android Studio if not already installed.
70+
71+
- Sync android codebase
72+
73+
```bash
74+
ionic cap sync android
75+
```
76+
77+
- Opening the Project in android Studio
78+
79+
```bash
80+
ionic cap open android
81+
```
82+
83+
Now you can run the app on a physical device or a virtual emulator, you can also build the app from the menu bar
84+
85+
## Running the Project on IOS Device
86+
87+
- Install XCode and XCode CLI if not already installed.
88+
89+
- Sync ios codebase
90+
91+
```bash
92+
ionic cap sync ios
93+
```
94+
95+
- Opening the Project in XCode
96+
97+
```bash
98+
ionic cap open ios
99+
```
100+
101+
Now you can run the app on a physical device or a virtual emulator, you can also build the app from the menu bar

Govt-Billing-React/android/.gitignore

+16-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
# NPM renames .gitignore to .npmignore
2-
# In order to prevent that, we remove the initial "."
3-
# And the CLI then renames it
4-
5-
# Using Android gitignore template: https://github.com/github/gitignore/blob/master/Android.gitignore
1+
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
62

73
# Built application files
84
*.apk
5+
*.aar
96
*.ap_
107
*.aab
118

@@ -19,7 +16,8 @@
1916
bin/
2017
gen/
2118
out/
22-
release/
19+
# Uncomment the following line in case you need and you don't have the release build type files in your app
20+
# release/
2321

2422
# Gradle files
2523
.gradle/
@@ -61,6 +59,10 @@ captures/
6159

6260
# External native build folder generated in Android Studio 2.2 and later
6361
.externalNativeBuild
62+
.cxx/
63+
64+
# Google Services (e.g. APIs or Firebase)
65+
# google-services.json
6466

6567
# Freeline
6668
freeline.py
@@ -84,8 +86,16 @@ lint/outputs/
8486
lint/tmp/
8587
# lint/reports/
8688

89+
# Android Profiling
90+
*.hprof
91+
8792
# Cordova plugins for Capacitor
8893
capacitor-cordova-android-plugins
8994

9095
# Copied web assets
9196
app/src/main/assets/public
97+
98+
# Generated Config files
99+
app/src/main/assets/capacitor.config.json
100+
app/src/main/assets/capacitor.plugins.json
101+
app/src/main/res/xml/config.xml

Govt-Billing-React/android/.idea/codeStyles/Project.xml

-113
This file was deleted.

Govt-Billing-React/android/.idea/jarRepositories.xml

-30
This file was deleted.

0 commit comments

Comments
 (0)