Script for creating a dist folder for loading the extension in developer mode

In developer mode, you can install an extension by selecting a whole directory that contains the source codes for the extension.

However, the app-clipper directory contains node modules, which altogether make it weigh more than 160mb.

There doesn't seem to exist a script that generates a lean, optimized folder that contains only the files the the browser needs.

My question is: Am I missing something? If not, is there a need for such a script to speed up the development process of the Joplin clipper. What I have on mind is a script that will create a dist directory and copy the following files to this directory:

  • the background and content scripts
  • the build directory of the popup
  • manifest.json
  • the icons folder

On testing, this dist folder weighs less than 1Mb, a step up from the 160mb original folder.

Every time you make some changes to any of the files above, you can run the script again to create a brand new, updated dist folder. Then in the Extensions Settings page, simply click the Reload link to update the extension in development mode.