This file contains hidden or 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
import Vue from 'vue' | |
import App from './VueApp.vue' | |
Vue.config.productionTip = false | |
/* eslint-disable no-new */ | |
new Vue({ | |
render: h => h(App) | |
}).$mount('#app') |
This file contains hidden or 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
<template> | |
<div id="app"> | |
<h1>Bem vindo ao Vue.js</h1> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "app", | |
} |
This file contains hidden or 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
const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
const merge = require("webpack-merge"); | |
const base = require("./base"); | |
const path = require("path"); | |
const { VueLoaderPlugin } = require('vue-loader') | |
module.exports = merge(base, { | |
mode: "development", | |
devtool: "source-map", // Mostar o source-map, permitindo o debug |
This file contains hidden or 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
const path = require("path"); | |
module.exports = { | |
target: "web", // O nosso aplicativo pode rodar sem o Electron | |
entry: [path.join(__dirname, '../../../src/vue.main.js')], // O arquivo de entrada para a nossa aplicação; Esses pontos de entrada podem ser nomeados e também podemos ter vários deles, caso queira dividir o "webpack bundle" em arquivos menores para aumentar a velocidade de carregamento dos scripts entre as várias paginas do nosso app | |
output: { | |
path: path.resolve(__dirname, "../../../../dist/webpack/vue"), // Onde todos os arquivos de saída do webpack serão colocados | |
filename: "bundle.js" // O nome do webpack bundle que será gerado | |
}, | |
module: { |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<h1>Hello World!</h1> | |
<h1>Hello World!</h1> |
This file contains hidden or 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
const { app, BrowserWindow } = require('electron') | |
function createWindow () { | |
// Cria uma janela de navegação. | |
const win = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { | |
nodeIntegration: true | |
} |
This file contains hidden or 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
{ | |
"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", |
This file contains hidden or 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
{ | |
"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", |
This file contains hidden or 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
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) |
This file contains hidden or 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
npm install --save-dev [email protected] | |
npm install --save-dev [email protected] |