Skip to content

Commit

Permalink
unwanted code remove and performace issue fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratikshakhandagale committed Jul 30, 2024
1 parent 6430e0c commit 8a92e41
Show file tree
Hide file tree
Showing 40 changed files with 5,239 additions and 2,079 deletions.
28 changes: 22 additions & 6 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"allowedCommonJsDependencies": ["crypto"],
"allowedCommonJsDependencies": ["crypto", "jsqr", "crypto-js", "get-youtube-id", "plyr", "crypto-js/md5", "dayjs", "crypto-js/sha1", "get-blob-duration"],
"assets": [
{
"glob": "**/*",
Expand Down Expand Up @@ -57,20 +57,36 @@
"node_modules/plyr/dist/plyr.js"
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
"ngswConfigPath": "ngsw-config.json",
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": true
},
"fonts": true
}
},
"configurations": {
"production": {
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": true
},
"fonts": true
},
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "10mb"
"maximumWarning": "20mb",
"maximumError": "100mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "5kb",
"maximumError": "10kb"
"maximumWarning": "5000kb",
"maximumError": "1000kb"
}
],
"fileReplacements": [
Expand Down
2 changes: 0 additions & 2 deletions hooks/copyGradleProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const appName = properties['app_name'];
const appid = properties['app_id'];
const verCode = properties['app_version_code'];

console.log("****** gradle properties ", properties);
let appId = `applicationId "${appid}"`;
let appendStr = '\t\tapplicationId app_id \n' +
'\t\tresValue("string", "app_name", "${app_name}") \n' +
Expand Down Expand Up @@ -103,7 +102,6 @@ fs.readFile("android/variables.gradle", 'utf-8', (err, data) => {
return;
}
if(data.match("minSdkVersion = 22")) {
console.log("exist ");
let updatedData = data.replace('minSdkVersion = 22', 'minSdkVersion = 23')
fs.writeFile("android/variables.gradle", updatedData, (err) => {
if (err) {
Expand Down
23 changes: 0 additions & 23 deletions hooks/updateManifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,31 +72,8 @@ fs.readFile("android/app/src/main/res/values/styles.xml", 'utf-8', (err, data) =
}
})

// update strings.xml
// fs.readFile("android/app/src/main/res/values/strings.xml", 'utf-8', (err, data) => {
// if(err) {
// console.log(err)
// }
fs.copyFile("configuration/strings.xml", "android/app/src/main/res/values/strings.xml", (err) => {
if(err) {
console.log(err)
}
})
// })

// fs.readFile(proguardPath, 'utf8', (err, data) => {
// if (err) {
// console.error(err);
// return;
// }
// console.log('update proguard ');
// if (data.match("# Please add ")) {

// } else {
// fs.appendFileSync(proguardPath, proguardTxt, (err) => {
// if (err) {
// console.error("********* err", err);
// }
// });
// }
// });
Loading

0 comments on commit 8a92e41

Please sign in to comment.