I have an electron app and below is the folder structure.
app
|--node_modules
|--somepackage/src
|--src
I am packaging this app using electron-packager, so I tried to ignore root level src folder by executing the below command.
"scripts": {
"pack": "rimraf ./packaged/ && electron-packager . Test.Client --app-version=0.0.1 --prune --out=packaged --platform=win32 --arch=x64 --overwrite --ignore=webpack.config.js --ignore=/src
},
but here the problem is my node_modules also have some packages which contains src folder and those src folders are also getting ignored by above --ignore=/src statment.
I have an electron app and below is the folder structure.
app
|--node_modules
|--somepackage/src
|--src
I am packaging this app using electron-packager, so I tried to ignore root level src folder by executing the below command.
"scripts": {
"pack": "rimraf ./packaged/ && electron-packager . Test.Client --app-version=0.0.1 --prune --out=packaged --platform=win32 --arch=x64 --overwrite --ignore=webpack.config.js --ignore=/src
},
but here the problem is my node_modules also have some packages which contains src folder and those src folders are also getting ignored by above --ignore=/src statment.
Share Improve this question asked May 25, 2018 at 8:16 Mahesh MoreMahesh More 8551 gold badge8 silver badges24 bronze badges 3- 1 That src in node_modules are also kind of no use because those packages must be having builds to facilitate the execution. – Pankaj Commented May 25, 2018 at 8:53
- 1 yes, but I am using logstash-client package and which is asking for debug module dependency inside src folder. If I remove --ignore statement my packaged application works. – Mahesh More Commented May 25, 2018 at 8:56
- Title sounds like the opposite of what OP asks. Maybe "how to not ignore package src folder"?.. – ghybs Commented May 26, 2018 at 2:06
1 Answer
Reset to default 23By default, electron-packager
is expecting a regular expression for the --ignore
flag, so you may want to try --ignore=^/src
to restrict the pattern to the root level...
Reference:
electron-packager API option: ignore