-Fix build.js files
-Upgrade Cordova android and electron.
-Update app package name when applicable.
-Update package-*.json files.
This commit is contained in:
Juan Carlos Ruvalcaba 2023-10-04 18:42:57 -07:00
parent cc9eb65639
commit 9f3a804100
7 changed files with 4692 additions and 3823 deletions

View File

@ -1,7 +1,7 @@
const webpack = require('webpack'); const webpack = require('webpack');
//const ora = require('ora'); //const ora = require('ora');
const rm = require('rimraf'); const {rimraf} = require('rimraf');
const chalk = require('chalk'); //const chalk = require('chalk');
const config = require('./webpack.config.js'); const config = require('./webpack.config.js');
const env = process.env.NODE_ENV || 'development'; const env = process.env.NODE_ENV || 'development';
@ -11,8 +11,8 @@ const isCordova = target === 'cordova'
//const spinner = ora(env === 'production' ? 'building for production...' : 'building development version...'); //const spinner = ora(env === 'production' ? 'building for production...' : 'building development version...');
//spinner.start(); //spinner.start();
rm(isCordova ? './cordova/www' : './www/', (removeErr) => { rimraf(isCordova ? './cordova/www' : './www/').then(() => {
if (removeErr) throw removeErr; //if (removeErr) throw removeErr;
webpack(config, (err, stats) => { webpack(config, (err, stats) => {
if (err) throw err; if (err) throw err;
@ -27,10 +27,10 @@ rm(isCordova ? './cordova/www' : './www/', (removeErr) => {
})}\n\n`); })}\n\n`);
if (stats.hasErrors()) { if (stats.hasErrors()) {
console.log(chalk.red('Build failed with errors.\n')); console.log('Build failed with errors.\n');
process.exit(1); process.exit(1);
} }
console.log(chalk.cyan('Build complete.\n')); console.log('Build complete.\n');
}); });
}); });

View File

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<widget id="com.comidacab.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <widget id="com.devmainbase.app" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Comida Cab</name> <name>Comida Cab</name>
<description> <description>
Aplicación de entrega de comida local. Aplicación de entrega de comida local.
@ -8,7 +8,6 @@
Aplicaciones Digitales Cab Aplicaciones Digitales Cab
</author> </author>
<content src="index.html" /> <content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="*" /> <access origin="*" />
<allow-intent href="http://*/*" /> <allow-intent href="http://*/*" />
<allow-intent href="https://*/*" /> <allow-intent href="https://*/*" />
@ -23,9 +22,7 @@
<allow-intent href="itms:*" /> <allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" /> <allow-intent href="itms-apps:*" />
</platform> </platform>
<allow-navigation href="*" /> <allow-navigation href="*" />
<platform name="android"> <platform name="android">
<preference name="StatusBarOverlaysWebView" value="false" /> <preference name="StatusBarOverlaysWebView" value="false" />
<preference name="android-minSdkVersion" value="22" /> <preference name="android-minSdkVersion" value="22" />
@ -47,8 +44,6 @@
<icon density="xxhdpi" src="res/icon/android/xxhdpi.png" /> <icon density="xxhdpi" src="res/icon/android/xxhdpi.png" />
<icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png" /> <icon density="xxxhdpi" src="res/icon/android/xxxhdpi.png" />
</platform> </platform>
<platform name="ios"> <platform name="ios">
<config-file parent="CFBundleAllowMixedLocalizations" platform="ios" target="*-Info.plist"> <config-file parent="CFBundleAllowMixedLocalizations" platform="ios" target="*-Info.plist">
<true /> <true />
@ -78,8 +73,6 @@
<icon height="167" src="res/icon/ios/icon-83.5x83.5@2x.png" width="167" /> <icon height="167" src="res/icon/ios/icon-83.5x83.5@2x.png" width="167" />
<icon height="1024" src="res/icon/ios/icon-512x512@2x.png" width="1024" /> <icon height="1024" src="res/icon/ios/icon-512x512@2x.png" width="1024" />
</platform> </platform>
<platform name="electron"> <platform name="electron">
<preference name="ElectronSettingsFilePath" value="electron-settings.json" /> <preference name="ElectronSettingsFilePath" value="electron-settings.json" />
<icon src="res/icon/electron/app.png" target="app" /> <icon src="res/icon/electron/app.png" target="app" />
@ -87,8 +80,6 @@
<preference name="ShowSplashScreen" value="false" /> <preference name="ShowSplashScreen" value="false" />
<preference name="AutoHideSplashScreen" value="true" /> <preference name="AutoHideSplashScreen" value="true" />
</platform> </platform>
<preference name="DisallowOverscroll" value="true" /> <preference name="DisallowOverscroll" value="true" />
<preference name="BackupWebStorage" value="local" /> <preference name="BackupWebStorage" value="local" />
<preference name="AutoHideSplashScreen" value="false" /> <preference name="AutoHideSplashScreen" value="false" />

5583
cordova/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
{ {
"name": "com.comidacab.app", "name": "com.devmainbase.app",
"displayName": "Comida Cab", "displayName": "Main Base Dev",
"version": "1.0.0", "version": "1.0.0",
"description": "Aplicaci<EFBFBD>n de entrega de comida local.", "description": "Aplicacion base inicial.",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1"
@ -13,22 +13,17 @@
"author": "Juan Carlos Ruvalcaba", "author": "Juan Carlos Ruvalcaba",
"license": "Closed source", "license": "Closed source",
"dependencies": { "dependencies": {
"cordova-android": "^9.1.0",
"cordova-electron": "^1.1.1",
"cordova-plugin-keyboard": "^1.2.0", "cordova-plugin-keyboard": "^1.2.0",
"cordova-plugin-splashscreen": "^6.0.0", "cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-statusbar": "^2.4.3", "cordova-plugin-statusbar": "^2.4.3",
"cordova-sms-plugin": "^1.0.1", "cordova-sms-plugin": "^1.0.1"
"onesignal-cordova-plugin": "^2.11.4"
}, },
"cordova": { "cordova": {
"plugins": { "plugins": {
"cordova-plugin-statusbar": {}, "cordova-plugin-statusbar": {},
"cordova-plugin-keyboard": {}, "cordova-plugin-keyboard": {},
"cordova-plugin-splashscreen": {}, "cordova-plugin-splashscreen": {},
"cordova-plugin-whitelist": {}, "cordova-sms-plugin": {}
"cordova-sms-plugin": {},
"onesignal-cordova-plugin": {}
}, },
"platforms": [ "platforms": [
"android", "android",
@ -36,6 +31,7 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"cordova-plugin-whitelist": "^1.3.4" "cordova-android": "^12.0.1",
"cordova-electron": "^3.1.0"
} }
} }

1027
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
{ {
"name": "comida-cab", "name": "main-base-dev",
"private": true, "private": true,
"version": "1.0.0", "version": "1.0.0",
"description": "Comida Cab", "description": "Main Base Dev",
"repository": "", "repository": "",
"license": "UNLICENSED", "license": "UNLICENSED",
"scripts": { "scripts": {
@ -27,8 +27,8 @@
"Samsung >= 5" "Samsung >= 5"
], ],
"dependencies": { "dependencies": {
"alasql": "^4.1.8", "alasql": "^4.1.10",
"axios": "^1.5.0", "axios": "^1.5.1",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"dom7": "^4.0.6", "dom7": "^4.0.6",
"framework7": "^8.3.0", "framework7": "^8.3.0",
@ -36,14 +36,14 @@
"html2pdf.js": "^0.10.1", "html2pdf.js": "^0.10.1",
"localforage": "^1.10.0", "localforage": "^1.10.0",
"skeleton-elements": "^4.0.1", "skeleton-elements": "^4.0.1",
"swiper": "^10.2.0" "swiper": "^10.3.1"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.22.20", "@babel/core": "^7.23.0",
"@babel/plugin-transform-runtime": "^7.22.15", "@babel/plugin-transform-runtime": "^7.22.15",
"@babel/preset-env": "^7.22.20", "@babel/preset-env": "^7.22.20",
"@babel/preset-react": "^7.22.15", "@babel/preset-react": "^7.22.15",
"@babel/runtime": "^7.22.15", "@babel/runtime": "^7.23.1",
"babel-loader": "^9.1.3", "babel-loader": "^9.1.3",
"chalk": "^5.3.0", "chalk": "^5.3.0",
"concurrently": "^8.2.1", "concurrently": "^8.2.1",
@ -62,8 +62,8 @@
"mini-css-extract-plugin": "^2.7.6", "mini-css-extract-plugin": "^2.7.6",
"ora": "^7.0.1", "ora": "^7.0.1",
"postcss-loader": "^7.3.3", "postcss-loader": "^7.3.3",
"postcss-preset-env": "^9.1.3", "postcss-preset-env": "^9.1.4",
"rimraf": "^5.0.1", "rimraf": "^5.0.5",
"style-loader": "^3.3.3", "style-loader": "^3.3.3",
"terser-webpack-plugin": "^5.3.9", "terser-webpack-plugin": "^5.3.9",
"url-loader": "^4.1.1", "url-loader": "^4.1.1",

View File

@ -24,11 +24,11 @@ import user from './stores/user.js';
var device = getDevice(); var device = getDevice();
var app = new Framework7({ var app = new Framework7({
name: 'Main App', // App name name: 'Main Base App', // App name
theme: 'auto', // Automatic theme detection theme: 'auto', // Automatic theme detection
el: '#app', // App root element el: '#app', // App root element
component: App, // App main component component: App, // App main component
id: 'com.devmain.app', // App bundle ID id: 'com.devmainbase.app', // App bundle ID
routes: routes, // App routes routes: routes, // App routes
// serviceWorker: { // Register service worker // serviceWorker: { // Register service worker
// path: '/service-worker.js', // path: '/service-worker.js',