This commit is contained in:
KorbsStudio 2023-01-23 03:56:29 -05:00
parent 7bb89707f9
commit 14d631c459
No known key found for this signature in database
9 changed files with 10 additions and 31521 deletions

View file

@ -72,6 +72,14 @@ yarn start
The `yarn start` command will it in development mode, in this mode, Electron will load a URL instead which is `localhost:3000`. This will not be the case in production mode for security purposes. The `yarn start` command will it in development mode, in this mode, Electron will load a URL instead which is `localhost:3000`. This will not be the case in production mode for security purposes.
This URL won't load up right away by Astro, wait a few moments, then press `Ctrl` + `R` in the app. This URL won't load up right away by Astro, wait a few moments, then press `Ctrl` + `R` in the app.
Build :
```
yarn build
```
The Electron build will use the SH file included(Tested on Linux only) to fix a path issue in Astro.
___ ___
*More to come** *More to come**

View file

View file

@ -1,33 +0,0 @@
const {app, BrowserWindow} = require('electron')
const isDev = require('electron-is-dev');
const {TitlebarRespect} = require('electron-titlebar-respect')
const glasstron = require('glasstron-clarity');
function createWindow () {
const mainWindow = new glasstron.BrowserWindow({
title: 'App Name',
minWidth: 400,
minHeight: 400,
width: 1200,
height: 800,
autoHideMenuBar: true,
blur: true,
frame: global.frame,
titleBarStyle: global.titleBarStyle,
trafficLightPosition: { x: 25, y: 25 }, // Position of Traffic Light buttons on macOS
titleBarOverlay: { // Background and Height of Windows titlebar buttons
color: '#191919', // Background
symbolColor: 'white', // Icon,
height: '40px',
},
webPreferences: {
webviewTag: true
}
})
if (isDev) {
mainWindow.loadURL('http://localhost:3000') // Use a URL in development mode
} else {
mainWindow.loadFile('app/index.html') // Do NOT use a URL in production mode, as that can create a security risk for your customers who will use this app
}
}
app.whenReady().then(() => {createWindow()})

15715
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -2,11 +2,10 @@
"name": "nexus-polestar", "name": "nexus-polestar",
"version": "1.0.0", "version": "1.0.0",
"description": "", "description": "",
"main": "index.js", "main": "./electron/index.js",
"scripts": { "scripts": {
"start": "concurrently \"astro dev\" \"electron .\"", "start": "concurrently \"astro dev\" \"electron .\"",
"build:astro": "astro build", "build": "astro build && node ./build/prepare-production.js && electron-builder build"
"build:electron": "node prepare-production.js && electron-builder build"
}, },
"author": "KorbsStudio", "author": "KorbsStudio",
"license": "MIT", "license": "MIT",

File diff suppressed because it is too large Load diff

View file

@ -1,8 +0,0 @@
var replace = require("replace");
replace({
regex: "/assets/",
replacement: "./assets/",
paths: ['./app/index.html'],
recursive: true,
silent: true,
});

File diff suppressed because it is too large Load diff

5301
yarn.lock

File diff suppressed because it is too large Load diff