How is the correct syntax to ignore more then one files and folders for electron-packager?
With only one arg like: --ignore=docs/*
it works fine. But I want to ignore more then one folder and files like: --ignore=docs/* + dev/* + someFile.js
How is the correct syntax to ignore more then one files and folders for electron-packager?
With only one arg like: --ignore=docs/*
it works fine. But I want to ignore more then one folder and files like: --ignore=docs/* + dev/* + someFile.js
Use the OR statement in the regular expression by using the | character in stead of the + character.
--ignore="docs/.*|dev/.*|somefile\.js"
For anyone out there who's looking for a simpler way of packaging an Angular application with Electron using electron-packager, this might get you sorted.
$ electron-packager . myapp --out=dist/builds/win --arch=x64 --icon=src/assets/images/win_icon.ico --asar --overwrite --ignore="(node_modules*|dist/builds*|dist/installers*|e2e*|src*)"
It works for me all the time, I use the terminal from VS Code.