-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: garbage collection / dead file detection #191
Comments
That's a great idea. If you're naming all your entry point pages, it should be fairly easy to diff the set of visited asset |
Also minus things like |
You probably still want to check that your |
That's ....... actually a good point 😬 |
I like the idea, but I'm actually not sure hyperlink is the best tools for it. Probably better to create a new tool that runs an assetgraph population based on entry points like hyperlink and a population query of |
Sure, a separate tool is also a possiblity. But hyperlink already maintains a set of processed urls so that it won't re-process already visited assets after they've become unloaded: Line 437 in e72157b
It's also a plus that hyperlink already has the There'll be a challenge with the That being said, I'd be happy to make a separate tool if you can come up with a good name that's not already taken in the npm registry :) |
|
I recently wanted to detect and clear out all the old files in my static site. I did this by
find
to list all files in my static sitediff
to list those files in my static site that are not accessible from the rootsHyperlink was very useful here, but I think it would be cool if the feature was built in, or if there was a good example in the README for how to do this with hyperlink. Ultimately I'd like to have this test in my CI to ensure I keep the site clean.
(Not posting my script here because it's awful messy, mostly due to scraping hyperlink's stdout!)
The text was updated successfully, but these errors were encountered: