Skip to content

Instantly share code, notes, and snippets.

View gdonega's full-sized avatar
🐈

Gustavo Donegá Queiroz gdonega

🐈
  • Brasil, São Paulo
View GitHub Profile
...
let mainConfig = {
entry: {
main: path.join(__dirname, '../src/main/index.js')
},
externals: [
...Object.keys(dependencies || {}),
{'electron-debug': 'electron-debug'}
],
module: {
...
function createWindow () {
/**
* Initial window options
*/
mainWindow = new BrowserWindow({
height: 563,
useContentSize: true,
width: 1000,
webPreferences: {
/**
* This file is used specifically and only for development. It installs
* `electron-debug` & `vue-devtools`. There shouldn't be any need to
* modify this file, but it can be used to extend your development
* environment.
*/
/* eslint-disable */
// Install `electron-debug` with `devtron`
@gdonega
gdonega / medium-criar-um-projeto-electron-vue-RemovendoWarningsEErros713-index.js
Created April 6, 2020 02:23
Habilitando as ferramentas de desenvolvimento novamente
...
let mainWindow
const winURL = process.env.NODE_ENV === 'development'
? `http://localhost:9080`
: `file://${__dirname}/index.html`
function createWindow () {
/**
* Initial window options
*/
@gdonega
gdonega / medium-criar-um-projeto-electron-vue-comandoAuditFix
Created April 6, 2020 02:28
Comando para corrigir com Audit do projeto
npm audit --fix
@gdonega
gdonega / medium-criar-um-projeto-electron-vue-RemovendoWarningsEErros72-ComandosAuditIndicou
Created April 6, 2020 02:37
Comandos indicados pelo audit para resolver dois problemas
npm install --save-dev [email protected]
npm install --save-dev [email protected]
package name: electron-with-vue (foi o valor padrão pra mim)
version: 1.0.0 (é o valor padrão)
description: A base Electron project using Vue.js
entry point: index.js (é o valor padrão)
test command: (deixei vazio)
git repository: (deixei vazio)
keywords: (deixei vazio)
author: gdonega
license: ISC (é o valor padrão)
{
"name": "electron-with-vue",
"version": "1.0.0",
"description": "A base Electron project using Vue.js",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "gdonega",
"license": "ISC",
{
"name": "electron-with-vue",
"version": "1.0.0",
"description": "A base Electron project using Vue.js",
"main": "app.main.js",
"scripts": {
"start": "electron ."
},
"author": "gdonega",
"license": "ISC",
const { app, BrowserWindow } = require('electron')
function createWindow () {
// Cria uma janela de navegação.
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
}