asar icon indicating copy to clipboard operation
asar copied to clipboard

feat: add flags to ignore files/directories

Open 1bitphoenix opened this issue 2 years ago • 6 comments

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]

1bitphoenix avatar Sep 19 '21 14:09 1bitphoenix

@erickzhao @malept If anyone could review this PR? Not sure who should I tag here.

1bitphoenix avatar Sep 28 '21 06:09 1bitphoenix

@zcbenz @kevinsawicki Can anyone review this PR? Not sure who should I tag here.

1bitphoenix avatar Oct 19 '21 13:10 1bitphoenix

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).

malept avatar Oct 19 '21 17:10 malept

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.)

1bitphoenix avatar Feb 07 '22 08:02 1bitphoenix

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).

@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?

1bitphoenix avatar Feb 07 '22 08:02 1bitphoenix

@ckerr Just a friendly ping. Can you review the PR with tests added?

1bitphoenix avatar Apr 09 '22 12:04 1bitphoenix