asar
asar copied to clipboard
feat: add flags to ignore files/directories
Add '--ignore-dir' flag to not include directories and '--ignore' flag to not include files while asar packaging
Signed-off-by: Rituka Patwal [email protected]
@erickzhao @malept If anyone could review this PR? Not sure who should I tag here.
@zcbenz @kevinsawicki Can anyone review this PR? Not sure who should I tag here.
Generally speaking, instead of adding a new pair of options, I'd prefer to have unpack
and unpackDir
be enhanced to take an array of globs in addition to a single glob. The glob
module should be able to specify ignores (just like the files
array in package.json
).
The idea and code both look fine, thank you for this patch!
However it doesn't look like you added anything to test/ to exercise these code paths. Would it be possible to add some tests for this feature?
Hi @ckerr, I have updated the PR by adding some tests. PTAL.
(PS: Sorry for the delay.)
Generally speaking, instead of adding a new pair of options, I'd prefer to have
unpack
andunpackDir
be enhanced to take an array of globs in addition to a single glob. Theglob
module should be able to specify ignores (just like thefiles
array inpackage.json
).
@malept I'm a little lost on how can we figure out from the list of globs which glob user wishes to unpack and which glob user wishes to ignore. Can you please explain your thoughts in detail?
@ckerr Just a friendly ping. Can you review the PR with tests added?