Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

161
Vistas
About Electron JS push specific folders?

I'm in doubt, I'm new to Electron and I want to ask if it's possible to make it play only in selected folders?

A clearer example of what I mean...

const { app, BrowserWindow, webFrame } = require("electron");

app.whenReady().then(() => _startElectron());

var mainWindow;

async function _startElectron() {
    const { screen } = require('electron');

    // Create a window that fills the screen's available work area.
const 
    primaryDisplay = screen.getPrimaryDisplay(),
    { width, height } = primaryDisplay.workAreaSize;

mainWindow = new BrowserWindow({ 
    width: width,
    minWidth: 640, 
    height: height, 
    minHeight: 360,
    frame: true, 
    autoHideMenuBar: true,
    darkTheme: true,
    webPreferences: {
        devTools: true
    }
});

    mainWindow.loadFile("dist/gamefile.html");
}

app.on('window-all-closed', () => app.quit());

mainWindow.loadFile("dist/gamefile.html"); in that case it is opening in dist/gamefile.html, it means that all the game source code is being pushed into the .exe file created by Electron.

That's the question, is there a way for the electron builder to just push what's inside the /dist folder? I don't want to make the source code available, just the compilation inside /dist, but the compiler is pushing everything to the .exe.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda