Skip to content
This repository has been archived by the owner on Feb 23, 2022. It is now read-only.

Non splitting renaming type #133

Open
gaetmorin opened this issue Jan 11, 2019 · 0 comments
Open

Non splitting renaming type #133

gaetmorin opened this issue Jan 11, 2019 · 0 comments

Comments

@gaetmorin
Copy link

I am trying to emit a CSS renaming map that does not split class names around hyphens (-). The Closure Compiler intrinsic goog.setCssNameMapping() supports this type of map via the BY_WHOLE style.

Using the latest version of the Closure Stylesheets command line (v1.5.0), there is a --output-renaming-map-format CLOSURE_COMPILED_BY_WHOLE option that appends 'BY_WHOLE' as a second argument to setCssNameMapping, but the renamings are otherwise unchanged (using --rename CLOSURE).

My understanding, after looking at the source code, is that this would require new RenamingType values for the --rename option that do not use SplittingSubstitutionMap. For example, CLOSURE_BY_WHOLE (returning a MinimalSubstitutionMap) and DEBUG_BY_WHOLE (returning a SimpleSubstitutionMap).

Am I missing something, is there another way do do this ? It feels like everything is in place between the CSS and JS compilers, except for this single piece ? Do the users of the BY_WHOLE mapping style call Closure Stylesheets as a library instead of the command line ?

Would the change described above be considered acceptable ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant