Scan for class names used in application CSS not otherwise parsed by CSS Blocks.
Throw an error if there's a conflict between the optimizer's class names and application CSS.
Add a new config option appClasses that's an alias for the optimizer config option that omits class names.
Add a smoke test to the ember-app fixture to exercise this new code.
Some refactoring to move common methods, interfaces, constants to shared utility files.
Testing Done
All testing done in the v2 ember-app fixture.
Build fails if optimization is enabled and the .i class is present.
Build succeeds if optimization is enabled, the .i class is present, and appClasses is declared.
Sample Error Message
Build Error (CSSBlocksStylesPostprocessorPlugin)
Your application CSS contains classes that are also generated by the CSS optimizer. This can cause style conflicts between your application's classes and those generated by CSS Blocks.
To resolve this conflict, you should add any short class names in non-block CSS (~5 characters or less) to the list of disallowed classes in your build configuration.
(You can do this by setting css-blocks.appClasses to an array of disallowed classes in ember-cli-build.js.)
Conflicting classes:
i
Resolves #496.
Changes
appClasses
that's an alias for the optimizer config option that omits class names.Testing Done
All testing done in the v2 ember-app fixture.
.i
class is present..i
class is present, andappClasses
is declared.Sample Error Message