Code Cleanup Made Easy... Remove JavaScript Exports, Files & Dependencies

preview_player
Показать описание
One of the hardest things to keep track of it a large project is unused dependencies, exports and files. Knip helps with all of that, being able to handle a large range of project types such as monorepos, offering a more configurable experience than other tools.

-----
Рекомендации по теме
Комментарии
Автор

Very good tool, I didn't know this was a thing first of all but this is awesome and I'll use it in my projects . Thanks for sharing this with us

ardianhotii
Автор

Wow!, thank you so much for covering such a usefull tool like this.

sire_ns
Автор

It's really nice, especially for exported fns

nikhilpsathyanathan
Автор

what about dependencies in different git branches? wouldn't it cause problems if knip deletes package from node modules in one brach, but package is used in another?

knowledgedose
Автор

Try this with Vite. First, install Vite, which will install 10 packages. Then, run pnpm dlx knip. It will show Vite itself as an unused dependency. If you uninstall Vite and run pnpm dlx knip again, it won’t show all the other packages that were originally installed with Vite as unused dependencies. This doesn’t seem to work correctly.

Am I misunderstanding something? The outcome is the same with even depcheck package, a Knip alternative.

bonsayeb
Автор

Really cool indeed, reduces bundle size

tamaniphiri
Автор

I don't think it's pronounced 'nip', but 'k-nip', with the 'k' not silent, since the tool is developed by a Dutch person and 'knip' means 'cut' in Dutch.

bart_pn
Автор

Here let met fix the title. "Code Cleanup Made Easy... Remove JavaScript "

SirDrinksAlot