jahaziel17 / wro4j

Automatically exported from code.google.com/p/wro4j
0 stars 0 forks source link

Create a custom model transformer which would remove 'damaged' resources. #873

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
A 'damaged' resource is a resource (either css or js) which is not valid 
(corrupted). Merging damaged resource with a valid resource could result in a 
damaged bundle. That is why, removing it from the model could be useful 
feature. Nevertheless, it is the responsibility of the client to keep the model 
sane and not add damaged resources to the model.

A resource should be identified as damaged using a custom processor 
implementation which is capable identifying the type of resource and if it is 
valid one.

The damaged resources will be removed from the model using a custom 
ModelTransformer. This model should either not be used by default, or should 
use a NoOp processor (assume all resources are not damaged).

In order to fully enable this feature (actually apply the processor responsible 
to detect damaged resources), a custom configuration should be required.

Discussion about this topic on the forum: 
https://groups.google.com/forum/#!topic/wro4j/cp3CPZKchCY

Original issue reported on code.google.com by alex.obj...@gmail.com on 5 May 2014 at 7:35