mixmaxhq / install-files

Share files like you would code, using npm.
MIT License
3 stars 2 forks source link

Remove files on uninstall #1

Open wearhere opened 8 years ago

wearhere commented 8 years ago

Using the example as reference, if my-ebextensions is uninstalled and the user hasn't customized my-ebextensions' files (not that they should have), my-ebextensions should take its files with it.

This would probably look something like adding an --uninstall flag to install-files, and then putting "uninstall": "install-files --uninstall source" in my-ebextensions' scripts stanza. install-files --uninstall source would compare every file in source to the corresponding file in my-ebextensions' (former) parent package and remove each file that was the same i.e. had not been edited by the user.