Closed toymachiner62 closed 8 years ago
I was lacking this too, and had a go with it today. I used gulp-delete-lines to delete injected dependencies. I made one task for deleting <link ref="stylesheet">
tags and one for deleting <script>
tags. Then I added my wiredep task to both the postinstall and preuninstall hooks in my .bowerrc
file, and made the delete tasks and the wiredep task depend on each other serially (because they all modify the same file).
Unfortunately, it didn't work out completely. Running the delete tasks manually works great, but when I run all three tasks together, nothing is deleted. According to console output, each task completes before the next starts, but things are still not deleted in the HTML.
Well, I'm content with the delete tasks I created, and just run them manually for now. Hopefully, gulp.series()
in Gulp 4 will solve it.
Run wiredep again and it will automatically remove them. Is it not doing that for you?
If that doesn't work then I will re-open this issue.
Is there any way to use wiredep to remove a dependency from my .html file that has been injected via wiredep?
I'm thinking that if i end up removing a bower dependency that is no longer needed, it'd be nice to use the bower hook preuninstall to remove the files from my .html file that were previously inject if i decide i no longer need a bower dependency.