This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
379 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
node_modules/ | ||
test/**/package-lock.json | ||
test/**/yarn.lock | ||
test/**/dist_electron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
#Electron-builder output | ||
/dist_electron |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# vue-app | ||
|
||
## Project setup | ||
|
||
``` | ||
yarn install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
|
||
``` | ||
yarn serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
### Lints and fixes files | ||
|
||
``` | ||
yarn lint | ||
``` | ||
|
||
### Customize configuration | ||
|
||
See [Configuration Reference](https://cli.vuejs.org/config/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: ["@vue/cli-plugin-babel/preset"], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"name": "vue-app", | ||
"version": "0.1.0", | ||
"author": { | ||
"email": "matthew@rathbonelabs.com", | ||
"url": "https://github.com/samuelmeuli/action-electron-builder" | ||
}, | ||
"repository": "https://github.com/samuelmeuli/action-electron-builder", | ||
"private": true, | ||
"scripts": { | ||
"serve": "vue-cli-service serve", | ||
"build": "vue-cli-service build", | ||
"lint": "vue-cli-service lint", | ||
"electron:build": "vue-cli-service electron:build", | ||
"electron:serve": "vue-cli-service electron:serve", | ||
"postinstall": "electron-builder install-app-deps", | ||
"postuninstall": "electron-builder install-app-deps" | ||
}, | ||
"main": "background.js", | ||
"dependencies": { | ||
"core-js": "^3.6.4", | ||
"vue": "^2.6.11" | ||
}, | ||
"devDependencies": { | ||
"@vue/cli-plugin-babel": "~4.3.0", | ||
"@vue/cli-plugin-eslint": "~4.3.0", | ||
"@vue/cli-service": "~4.3.0", | ||
"babel-eslint": "^10.1.0", | ||
"electron": "^6.0.0", | ||
"eslint": "^6.7.2", | ||
"eslint-plugin-vue": "^6.2.2", | ||
"vue-cli-plugin-electron-builder": "^2.0.0-beta.6", | ||
"vue-template-compiler": "^2.6.11" | ||
}, | ||
"eslintConfig": { | ||
"root": true, | ||
"env": { | ||
"node": true | ||
}, | ||
"extends": [ | ||
"plugin:vue/essential", | ||
"eslint:recommended" | ||
], | ||
"parserOptions": { | ||
"parser": "babel-eslint" | ||
}, | ||
"rules": {} | ||
}, | ||
"browserslist": [ | ||
"> 1%", | ||
"last 2 versions", | ||
"not dead" | ||
] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico" /> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong | ||
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without | ||
JavaScript enabled. Please enable it to continue.</strong | ||
> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<div id="app"> | ||
<img alt="Vue logo" src="./assets/logo.png" /> | ||
<HelloWorld msg="Welcome to Your Vue.js App" /> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import HelloWorld from "./components/HelloWorld.vue"; | ||
export default { | ||
name: "App", | ||
components: { | ||
HelloWorld, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style> | ||
#app { | ||
font-family: Avenir, Helvetica, Arial, sans-serif; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
text-align: center; | ||
color: #2c3e50; | ||
margin-top: 60px; | ||
} | ||
</style> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
"use strict"; | ||
|
||
import { app, protocol, BrowserWindow } from "electron"; | ||
import { | ||
createProtocol, | ||
/* installVueDevtools */ | ||
} from "vue-cli-plugin-electron-builder/lib"; | ||
const isDevelopment = process.env.NODE_ENV !== "production"; | ||
|
||
// Keep a global reference of the window object, if you don't, the window will | ||
// be closed automatically when the JavaScript object is garbage collected. | ||
let win; | ||
|
||
// Scheme must be registered before the app is ready | ||
protocol.registerSchemesAsPrivileged([ | ||
{ scheme: "app", privileges: { secure: true, standard: true } }, | ||
]); | ||
|
||
function createWindow() { | ||
// Create the browser window. | ||
win = new BrowserWindow({ | ||
width: 800, | ||
height: 600, | ||
webPreferences: { | ||
nodeIntegration: true, | ||
}, | ||
}); | ||
|
||
if (process.env.WEBPACK_DEV_SERVER_URL) { | ||
// Load the url of the dev server if in development mode | ||
win.loadURL(process.env.WEBPACK_DEV_SERVER_URL); | ||
if (!process.env.IS_TEST) win.webContents.openDevTools(); | ||
} else { | ||
createProtocol("app"); | ||
// Load the index.html when not in development | ||
win.loadURL("app://./index.html"); | ||
} | ||
|
||
win.on("closed", () => { | ||
win = null; | ||
}); | ||
} | ||
|
||
// Quit when all windows are closed. | ||
app.on("window-all-closed", () => { | ||
// On macOS it is common for applications and their menu bar | ||
// to stay active until the user quits explicitly with Cmd + Q | ||
if (process.platform !== "darwin") { | ||
app.quit(); | ||
} | ||
}); | ||
|
||
app.on("activate", () => { | ||
// On macOS it's common to re-create a window in the app when the | ||
// dock icon is clicked and there are no other windows open. | ||
if (win === null) { | ||
createWindow(); | ||
} | ||
}); | ||
|
||
// This method will be called when Electron has finished | ||
// initialization and is ready to create browser windows. | ||
// Some APIs can only be used after this event occurs. | ||
app.on("ready", async () => { | ||
if (isDevelopment && !process.env.IS_TEST) { | ||
// Install Vue Devtools | ||
// Devtools extensions are broken in Electron 6.0.0 and greater | ||
// See https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/378 for more info | ||
// Electron will not launch with Devtools extensions installed on Windows 10 with dark mode | ||
// If you are not using Windows 10 dark mode, you may uncomment these lines | ||
// In addition, if the linked issue is closed, you can upgrade electron and uncomment these lines | ||
// try { | ||
// await installVueDevtools() | ||
// } catch (e) { | ||
// console.error('Vue Devtools failed to install:', e.toString()) | ||
// } | ||
} | ||
createWindow(); | ||
}); | ||
|
||
// Exit cleanly on request from parent process in development mode. | ||
if (isDevelopment) { | ||
if (process.platform === "win32") { | ||
process.on("message", data => { | ||
if (data === "graceful-exit") { | ||
app.quit(); | ||
} | ||
}); | ||
} else { | ||
process.on("SIGTERM", () => { | ||
app.quit(); | ||
}); | ||
} | ||
} |
Oops, something went wrong.