Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

162
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda