I'm just starting to learn about how JavaScript, HTML, and Electron all work, and I want to know what runs electron .
in the "scripts" -> "start" of package.json
, because I can't tell what does and that kind of wizardry makes me nervous.
According to the man pages for npm
, what npm start
does is that it reads the package.json
, looks at the script under "scripts" -> "start" -> some_script
, and then runs some_script
. Sometimes, some_script
is something like node foobar.js
, which makes sense to me, since I can run that from the command line. NodeJS is executing foobar.js. However, in the case of the electron-api-demos
, some_script
is electron .
You can download and run electron-api-demos
via
git clone https://github.com/electron/electron-api-demos
cd electron-api-demos/
npm install && npm start
In order to try to figure out what is running electron .
, I've run it in the node
shell, and I've tried running node main.js
. I've even tried opening up the node
shell and running
electron-api-demos@2.0.2 start $DIR/electron-api-demos
electron .
(which is exactly the output of npm start
). None of them worked, because none of them started up the Electron application. At this point I'm very puzzled at how, exactly, the start script gets executed at all.
So I guess my question is: does there exist a command (that I can use on the command line) to start up this Electron application, without using npm
? If not, what is npm
calling to start up this Electron app?
I apologize if this question has been asked before, but I all the sources I found didn't seem to go into any further detail about what, exactly, is done when npm start
is run and how it executes electron .
. Thank you for your time!