-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Abhishek Pratap edited this page Apr 16, 2021
·
1 revision
To search and delete node_modules from older projects.๐ฎ
we all suddenly face problem with device space getting full, main culprit for us developers is dependencies (node_modules), it can be more than 300MB+ ๐ฒ for react and more if you add more dependencies later on, which we all do ๐คฆโโ๏ธ.
npkill is just awesome easy to use cli tool.
$ npm i -g npkill
$ npx npkill
Some Useful commands
$ npkill -d ~/projects
$ npkill --color magenta
$ npkill --target dist -e
$ npkill -d '~/more projects' -gb --sort size --target vendor
To fix long import relative paths for project.๐
We all have file path looked like this ../../../../../
so on. At some point it feels like we are importing something out of project, if you have not been there than you are lucky or have great folder structure and if you have one contact me ๐.
There is an easy solution for VS Code users, sorry for the 1% people who are not using VS Code. ๐
- create
jsconfg.json
file in your project root directory. - Inside file map paths in your project using keyword.
{ "compilerOptions": { "baseUrl": "./", "paths": { @components/*": ["components/*"] @lib/*": ["lib/*"] @styles/*": ["styles/*"] } } }