privatenumber / link

🔗 A better `npm link`
193 stars 8 forks source link

Suggestion: Support unlink command #12

Closed segevofer closed 11 months ago

segevofer commented 2 years ago

Suggestion: After running npx link support running npx link --unlink instead of running npm i

privatenumber commented 2 years ago

Sounds good to me. PR welcome!

privatenumber commented 11 months ago

Actually, there isn't much we can do on our end.

npx link isn't aware of the package manager being used and how node_modules is structured, so the most it can do is delete all symlinks in node_modules.

Deleting the symlinks will prevent the package from working expectedly, so the dev will have to run npm install anyway to fix the node_modules.