For chrome's build purposes, we need to write our output into the gen/ directory and it's going to have to match the original directory structure to make includes work. That means we need the option to specify an output file rather than rewriting the input file.
It's likely that others will need similar functionality if this use this, so I think it makes sense to handle the recursion and output-directory creation in the rewriter rather than e.g. saying leaving that up to each caller.
Follow on from #52.
For chrome's build purposes, we need to write our output into the
gen/
directory and it's going to have to match the original directory structure to make includes work. That means we need the option to specify an output file rather than rewriting the input file.It's likely that others will need similar functionality if this use this, so I think it makes sense to handle the recursion and output-directory creation in the rewriter rather than e.g. saying leaving that up to each caller.