This repository has been archived by the owner on Feb 23, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework substitution maps to allow reusing them across compiles.
I need to be able to compile multiple CSS bundles using a rename map, then recompile just a few based on hash checking. There are two problems with using CssCompiler.execute(renameFile, ...). 1. CssCompiler writes out the rename map using only the entries actually encountered by keeping a side table of mappings, not getting the entire mapping from the SubstitutionMap. 2. MinimalSubstitutionMap and others have no standard way to reconstitute a substitution map from a string->string relation. This addresses both problems. I added read() methods to OutputRenamingMapFormat. I added an Initializable interface to SubstitutionMap that allows reconstituting a renamer from a rename map, and reworked RecordingSubstitutionMap and friends to implement Initializable. Along the way, I cleared up an ambiguity in how SplittingSubstitutionMap & RecodingSubstitutionMap interpreted renamings that caused problems when a prefixing substitution map effectively prefixed only the first renaming in a chain. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=131714015
- Loading branch information
Showing
7 changed files
with
459 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.