Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

execute main.js from a sub directory

Tags:

Why on earth can I not move my main.js file into a sub directory and have electron build from the that sub directory? for instance my file structure:

app
|_package.json
|_node_modules
|_src
  |_main.js
  |_index.html
  |_renderer.js
  |_...

My package.json:

"main":"main.js",
"scripts" : {
  "start": "electron ./src"
}

When I run start electron launches the intro screen("to start your application run ...") and not the application I created at ./src. Is there a package out there that allows for this to happen? is there something I'm missing in the package.json file?

Been a while since I posted to SO but this one got me stumped / its not clearly documented on Electron's site(you'd think it would be in architecture). I do see in the quickstart about file structure but it doesn't say I can't do as I illustrated above^ It's not really a big deal I just hate when Im forced into a specific file structure.