npkill icon indicating copy to clipboard operation
npkill copied to clipboard

Kill package-lock.json

Open mokone91 opened this issue 3 years ago • 1 comments

Thanks for this wonderful tool!

is it possible to add the ability to remove package-lock.json files too? Thanks!

mokone91 avatar Dec 16 '21 16:12 mokone91

Convenient addition. Can be used via flag

hd321kbps avatar Dec 18 '21 11:12 hd321kbps

Thank you for your comment! I must admit that I have been thinking about this issue for several days.

There is the --target parameter in which you can specify a different target than node_modules but it certainly won't work since for efficiency it only searches between directories... wait, Efficiency?

I have done some tests and at least in unix there is hardly any difference between filtering by files and directories, so it will be easy to ajust.

On the other hand for windows it will require some extra modification. I will work on it for the next version.

TLDR: Soon with the --target flag you will be able to specify also files instead of only directories so you will be able to use npkill --target package-lock.json .

zaldih avatar Oct 28 '22 09:10 zaldih

Done at 6f8c1caf6a7662d1b4e16bc9fb17b9faa2feb126

In the next release it will also be possible to specify files as target as requested.

zaldih avatar Oct 28 '22 13:10 zaldih