title: Changing Package.json packages depending on how the project is used
body: <p>Hi I am trying to find out if there is a way to add remove packages automatically depending on how the project is used.</p>
  <p>Example.
  I have a program which is an express app, wrapped in electron to become a desktop application.
  But I also use that same express application as a service on Azure and local linux installs.</p>
  <p>When I do the cloud and local linux services, it installs all the packages from the package.json, including the electron packages which are not needed for these and take up space unnecessarily.</p>
  <p>Is there a way I can dynamically add or remove the electron packages depending on how they are used. Also I have two JS files that start the express server JS file. One for desktop using electron package, and the other JS file does not.</p>
  <p>Cheers Mitchell</p>