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 io.github.gdonega.shortcuts.generators; | |
import java.util.Random; | |
public class BrazilCepGenerator { | |
private static String randomDe0A9() { | |
return Integer.toString(new Random().nextInt(0, 9 + 1)); | |
} | |
public static String generate() { |
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
// Depencias gerais | |
const { app, protocol, BrowserWindow } = require('electron') | |
const isDev = process.env.NODE_ENV === "development"; // Boolean gerado através da variavel de ambiente que define se o aplicativo está rodando como desenvolvimento ou produção | |
// Dependencias do desenvolvimento | |
const port = 40992; // Deve ser a mesma porta do Servidor Vue.js (webpack de desenvolvimento): no arquivo que está em app/config/vue/webpacks/dev.js (partindo da raiz do projeto) | |
const selfHost = `http://localhost:${port}`; | |
// Dependencias de produção | |
const Protocol = require("./app/config/electron/protocol"); |
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", | |
"homepage": "https://github.com/gdonega/Medium-BoilerplateElectronWithVue", | |
"repository": "https://github.com/gdonega/Medium-BoilerplateElectronWithVue", | |
"main": "app.main.js", | |
"scripts": { | |
"dev-electron-start-app": "cross-env NODE_ENV=development electron .", | |
"dev-vue-start-server": "cross-env NODE_ENV=development webpack-dev-server --config ./app/config/vue/webpacks/dev.js", |
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 lang="pt-br"> | |
<head> | |
<meta charset="UTF-8" /> | |
<base href="app://rse"> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> |
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
// Depencias gerais | |
const { app, protocol, BrowserWindow } = require('electron') | |
const isDev = process.env.NODE_ENV === "development"; // Boolean gerado através da variavel de ambiente que define se o aplicativo está rodando como desenvolvimento ou produção | |
// Dependencias do desenvolvimento | |
const port = 40992; // Deve ser a mesma porta do Servidor Vue.js (webpack de desenvolvimento): no arquivo que está em app/config/vue/webpacks/dev.js (partindo da raiz do projeto) | |
const selfHost = `http://localhost:${port}`; | |
// Dependencias de produção | |
const Protocol = require("./app/config/electron/protocol"); |
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
/* | |
Reasonably Secure Electron | |
Copyright (C) 2019 Bishop Fox | |
This program is free software; you can redistribute it and/or | |
modify it under the terms of the GNU General Public License | |
as published by the Free Software Foundation; either version 2 | |
of the License, or (at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
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: "production", | |
devtool: "nosources-source-map", |
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": { | |
"dev-electron-start-app": "cross-env NODE_ENV=development electron .", | |
"dev-vue-start-server": "cross-env NODE_ENV=development webpack-dev-server --config ./app/config/vue/webpacks/dev.js", | |
"dev": "concurrently \"npm run dev-vue-start-server\" \"npm run dev-electron-start-app\" -k" | |
}, |
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') | |
const port = 40992; // Deve ser a mesma porta do Servidor Vue.js (webpack de desenvolvimento): no arquivo que está em app/config/vue/webpacks/dev.js (partindo da raiz do projeto) | |
const selfHost = `http://localhost:${port}`; | |
function createWindow () { | |
// Cria uma janela de navegação. | |
const win = new BrowserWindow({ | |
width: 800, | |
height: 600, | |
webPreferences: { |
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 lang="pt-br"> | |
<head> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
<div id="app"></div> | |
</body> | |
</html> |
NewerOlder