Start nodejs

This commit is contained in:
WardPearce
2024-09-19 13:57:52 +12:00
parent db7ca0da94
commit 37b8d6d7a9
7 changed files with 32 additions and 8 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ android {
applicationId "us.materialio.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 40
versionName "1.4.3"
versionCode 41
versionName "1.5.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "Materialious",
"version": "1.4.3",
"version": "1.5.0",
"description": "Modern material design for Invidious.",
"author": {
"name": "Ward Pearce",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "materialious",
"version": "1.4.1",
"version": "1.4.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "materialious",
"version": "1.4.1",
"version": "1.4.3",
"dependencies": {
"@capacitor-community/electron": "^5.0.1",
"@capacitor/android": "6.1.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "materialious",
"version": "1.4.3",
"version": "1.5.0",
"private": true,
"scripts": {
"dev": "vite dev",
+1 -1
View File
@@ -124,7 +124,7 @@
"backgroundPlay": "Play audio in background",
"dash": "Dash",
"silenceSkipper": "Silence skipper (Experimental)",
"youtubeJsFallback": "Locally video processing fallback"
"youtubeJsFallback": "Local video processing fallback"
},
"bookmarklet": "Bookmarklet",
"instanceUrl": "Instance URL",
@@ -123,6 +123,30 @@
notifications = feed.notifications;
}
function channelListener(msg) {
console.log('[cordova] received:' + msg);
}
function startupCallback(err) {
if (err) {
console.log(err);
} else {
console.log('Node.js Mobile Engine Started');
nodejs.channel.send('Hello from Cordova!');
}
}
function startNodeProject() {
nodejs.channel.setListener(channelListener);
nodejs.start('main.js', startupCallback);
// To disable the stdout/stderr redirection to the Android logcat:
// nodejs.start('main.js', startupCallback, { redirectOutputToLogcat: false });
}
addEventListener('deviceready', () => {
startNodeProject();
});
onMount(async () => {
ui();
+1 -1
View File
@@ -5,7 +5,7 @@ import json
import os
import re
LATEST_VERSION = "1.4.3"
LATEST_VERSION = "1.5.0"
WORKING_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "materialious")
ROOT_PACKAGE = os.path.join(WORKING_DIR, "package.json")