I have an Electron installed. I wrote html, js, package.json. I open Electron, transfer my html file there, the application starts. And now what? And how to show a friend? "Install an electron, so I threw you the files, open the electron, transfer the file with the .html extension to a special window, see what a beautiful application I have." Can't you do something normal? How to make it so that I would throw off a friend, well, maybe a folder, but what would there be to open 1 file to launch my application?

    1 answer 1

    You can use Electron packager .

    To install we write:

    $ npm install electron-packager --save-dev 

    Then in package.json add to "scripts" :

     "scripts": { "pack": "electron-packager <тут путь к папке программы> <название программы> --platform=win32 --arch=x64" } 

    And, yes, it is necessary to run like this:

     npm run pack 

    PS True, it’s not just a single file, but a whole file daddy ..

    • Through "pack" - nothing happened. He sat, pokrehtel, tried to do something, even read instructions on the githaba, looked at the tutorials on YouTube, eventually just with eyes in different directions, with saliva at the mouth, considering himself a moron, the command electron-packager <тут путь к папке программы> <название программы> --platform=win32 --arch=x64 put in "start" and it all worked after $ npm start. Thank you) - Don2Quixote pm
    • one
      I just forgot to clarify what to run like this: npm run pack )))) - entithat
    • ahaha) Anyway, thanks. - Don2Quixote 3:16 pm