update
This commit is contained in:
parent
7bb89707f9
commit
14d631c459
9 changed files with 10 additions and 31521 deletions
|
@ -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.
|
||||
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**
|
0
build.sh
0
build.sh
33
index.js
33
index.js
|
@ -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
15715
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -2,11 +2,10 @@
|
|||
"name": "nexus-polestar",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"main": "./electron/index.js",
|
||||
"scripts": {
|
||||
"start": "concurrently \"astro dev\" \"electron .\"",
|
||||
"build:astro": "astro build",
|
||||
"build:electron": "node prepare-production.js && electron-builder build"
|
||||
"build": "astro build && node ./build/prepare-production.js && electron-builder build"
|
||||
},
|
||||
"author": "KorbsStudio",
|
||||
"license": "MIT",
|
||||
|
|
5245
pnpm-lock.yaml
5245
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
|||
var replace = require("replace");
|
||||
replace({
|
||||
regex: "/assets/",
|
||||
replacement: "./assets/",
|
||||
paths: ['./app/index.html'],
|
||||
recursive: true,
|
||||
silent: true,
|
||||
});
|
5216
yarn-error.log
5216
yarn-error.log
File diff suppressed because it is too large
Load diff
Reference in a new issue