Compare commits
2 Commits
67cf9b5bf7
...
6d82f5f5b3
Author | SHA1 | Date |
---|---|---|
|
6d82f5f5b3 | |
|
488b7a5e27 |
|
@ -6,12 +6,13 @@ function createWindow() {
|
||||||
width: 800,
|
width: 800,
|
||||||
height: 600,
|
height: 600,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
contextIsolation: true,
|
contextIsolation: false,
|
||||||
|
nodeIntegration: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (process.env.NODE_ENV === 'production') {
|
if (process.env.NODE_ENV === 'production') {
|
||||||
win.loadFile('./build/index.html');
|
win.loadFile('./index.html');
|
||||||
} else {
|
} else {
|
||||||
win.loadURL('http://localhost:8080');
|
win.loadURL('http://localhost:8080');
|
||||||
}
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"main": "main.js"
|
||||||
|
}
|
|
@ -272,6 +272,15 @@
|
||||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"cross-env": {
|
||||||
|
"version": "7.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
|
||||||
|
"integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"cross-spawn": "^7.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"cross-spawn": {
|
"cross-spawn": {
|
||||||
"version": "7.0.3",
|
"version": "7.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
{
|
{
|
||||||
"main": "electron.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "snowpack dev",
|
"start": "snowpack dev",
|
||||||
"build": "snowpack build",
|
"build": "snowpack build",
|
||||||
"snowpack-dev": "snowpack dev --open none",
|
"snowpack-dev": "snowpack dev --open none",
|
||||||
"electron-dev": "concurrently \"npm run snowpack-dev\" \"npm run electron-start\"",
|
"electron-dev": "concurrently \"npm run snowpack-dev\" \"npm run electron-start\"",
|
||||||
"electron-start": "electron .",
|
"electron-start": "electron ./build",
|
||||||
"electron-prod": "cross-env NODE_ENV=production electron ."
|
"electron-prod": "cross-env NODE_ENV=production electron ./build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@snowpack/plugin-svelte": "^3.5.2",
|
"@snowpack/plugin-svelte": "^3.5.2",
|
||||||
"@snowpack/plugin-typescript": "^1.2.1",
|
"@snowpack/plugin-typescript": "^1.2.1",
|
||||||
"@tsconfig/svelte": "^1.0.10",
|
"@tsconfig/svelte": "^1.0.10",
|
||||||
"concurrently": "^5.3.0",
|
"concurrently": "^5.3.0",
|
||||||
|
"cross-env": "^7.0.3",
|
||||||
"electron": "^11.2.3",
|
"electron": "^11.2.3",
|
||||||
"snowpack": "^3.0.1",
|
"snowpack": "^3.0.1",
|
||||||
"svelte-preprocess": "^4.6.9",
|
"svelte-preprocess": "^4.6.9",
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="description" content="Accord" />
|
<meta name="description" content="Accord" />
|
||||||
<link rel="stylesheet" type="text/css" href="/index.css" />
|
<link rel="stylesheet" type="text/css" href="./index.css" />
|
||||||
<title>Accord</title>
|
<title>Accord</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script type="module" src="/dist/index.js"></script>
|
<script type="module" src="./dist/index.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,6 +4,7 @@ module.exports = {
|
||||||
/* ... */
|
/* ... */
|
||||||
// 'build directory'
|
// 'build directory'
|
||||||
public: '/',
|
public: '/',
|
||||||
|
electron: '/',
|
||||||
src: '/dist',
|
src: '/dist',
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
<script lang='typescript'>
|
<script lang='typescript'>
|
||||||
import { onMount } from 'svelte'
|
import { onMount } from 'svelte'
|
||||||
|
const { spawn } = require('child_process')
|
||||||
|
import AppHeader from './components/AppHeader.svelte'
|
||||||
|
|
||||||
let count: number = 0
|
let count: number = 0
|
||||||
|
|
||||||
onMount(() => {
|
onMount(() => {
|
||||||
const interval = setInterval(() => count++, 1000)
|
const interval = setInterval(() => count++, 1000)
|
||||||
|
// TODO: Spin up service
|
||||||
return () => {
|
return () => {
|
||||||
clearInterval(interval)
|
clearInterval(interval)
|
||||||
|
// TODO: Close service
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
@ -15,7 +19,10 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<div class="App">
|
<div class="App">
|
||||||
<header class="App-header">
|
<AppHeader/>
|
||||||
|
<nav>
|
||||||
|
</nav>
|
||||||
|
<main>
|
||||||
<p>Page has been open for <code>{count}</code> seconds.</p>
|
<p>Page has been open for <code>{count}</code> seconds.</p>
|
||||||
</header>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
<header>
|
||||||
|
Application Header
|
||||||
|
</header>
|
Loading…
Reference in New Issue