cgross / grunt-dom-munger

Grunt task to read and manipulate HTML with CSS selectors.
MIT License
93 stars 40 forks source link

Multiple runs of dom-munger can fail #25

Open mattcodez opened 10 years ago

mattcodez commented 10 years ago

Hi there, great plugin, think I found an issue though. Let me know if there's a better way to do this but I have a situation where I have to run six different dom-munger operations/targets across three different HTML files, all to separate HTML destinations. The easiest way it seems to do this was to run dom-munger three times, changing necessary variables for the paths. One of the six operations is a read to a property named 'jsFiles'. When dom-munger is run a second time, it sees dom_munger.data (where 'jsFiles' resides) as a target and attempts to run it. This causes the whole grunt file to stop. I think something needs to be implemented where a target named 'data' is skipped.

The quick work around for now is to just explicitly call each of the six dom-munger targets in order for every file as opposed to just blanket running 'dom-munger'.