user4318831
user4318831

Reputation:

How do I figure out what files are not being used in a website/web app?

I am working on a web app and the backend of a website.

I have gone through many prototypes taking out links to files and not deleting and using less.js and coffee to make life easier.

Is there anyway I can programmatically figure out what I can delete without breaking anything?

Upvotes: 1

Views: 291

Answers (2)

Alex
Alex

Reputation: 14503

If you have a messy project with a significant amount of redundant files and don't know what to delete, I'd try the other way around: Start a new project and only copy over the things you need, if you'll miss something, you'll notice it.

I always get a fresh and stable feeling when I use this strategy.

But it might be unsuitable if your system is too big or you have an unfavorable ratio of keep/throw.

Upvotes: 0

posit labs
posit labs

Reputation: 9431

It's a bit of a manual process, but I use my IDE's find-all command to search for references in the project. If an object or file isn't referenced anywhere, I deem it delete-able.

Upvotes: 1

Related Questions