Electron-packager: I am unclear how to pass an array of regexes to `--ignore`.

Created on 30 Mar 2017  路  2Comments  路  Source: electron/electron-packager

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Please describe your issue:

I am unclear how to pass an array of regexes to --ignore.

This works - when I just want to ignore one file: electron-packager --ignore=browserify-cache.json

These do not, when I want to ignore more than one:

electron-packager --ignore=browserify-cache.json,embedded.js # -> makes one ignore string
electron-packager --ignore=[browserify-cache.json,embedded.js]  # -> outputs "no matches found: --ignore=[browserify-cache.json,embedded.js]"
electron-packager --ignore="[browserify-cache.json,embedded.js]" # -> makes one ignore string
electron-packager --ignore=/browserify-cache.json/,/embedded.js/   # -> makes one ignore string
electron-packager --ignore=[/browserify-cache.json/,/embedded.js/] # ->" outputs no matches found: --ignore=[/browserify-cache.json/,/embedded.js/]"

I am at a loss. It seems to me that there is an "obvious" convention for writing arrays in a command line option which is why the precise syntax is not documented or has no examples, but this is an aspect of UNIX command line I am completely unfamiliar with. Please help?

question

Most helpful comment

You can do one of two things:

  • specify --ignore more than once: --ignore='browserify-cache\.json' --ignore='embedded\.js'
  • Use regular expression syntax: --ignore='browserify-cache\.json|embedded\.js'

It should be noted in the CLI help that you can specify certain parameters multiple times.

All 2 comments

You can do one of two things:

  • specify --ignore more than once: --ignore='browserify-cache\.json' --ignore='embedded\.js'
  • Use regular expression syntax: --ignore='browserify-cache\.json|embedded\.js'

It should be noted in the CLI help that you can specify certain parameters multiple times.

Got it - thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

akcorp2003 picture akcorp2003  路  4Comments

rafaelcastrocouto picture rafaelcastrocouto  路  3Comments

TongDaDa picture TongDaDa  路  3Comments

quadrophobiac picture quadrophobiac  路  4Comments

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  4Comments