Search code examples
javascriptnpmpackageelectronelectron-packager

How to make electron-packager to use outer directory files while packaging


I am trying to package my electron app, which is basically two npm directories one inside other. The internal npm directory is my electron app and it makes use of the outer directory scripts. My internal package.json file which is associated with electron app is where I define my electron-packager scripts. I have a question here, I have given my source file for the package as '.' which means present directory, does this also consider the files in the outer directory? I tried this and my app is working fine for now, but I doubt if somewhere something can go wrong if I am not doing this properly. If this is not the proper way how can I tell electron-packager to consider files outside of the current directory? or Does it automatically consider all the required files and scripts irrespective of their path while packaging?


Solution

  • It automatically considers all the files present in the current directory which includes the package.json file. Also I found 'Bolt' useful while working with multiple npm packages.

    https://www.npmjs.com/package/bolt