First pass at 'spew' debug mode #228
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I took a shot at implementing a
spewdebug mode similar to what was mentioned in #168. I've added aspew_outputattribute for top-level bundles that specifies the directory into which files should be saved after applying filters. Files are saved in this directory using the same directory structure relative to the environment directory. External assets (loaded from URLs) are saved inhost.com/path/to/file.jsin this directory. There's also an optionalspew_extattribute that lets you specify a new extension for generated files.This is just a rough draft so I haven't tested anything extensively but if this looks like something you might want I can write some tests and documentation. A few remarks:
Let me know what you think. I'm happy to make changes if you'd rather do this differently. Would love to see this feature in webassets and possibly add support for source maps as well.