@@ -73,9 +73,22 @@ module.exports = {
7373 this . appConfig = app . project . config ( app . env ) ;
7474 this . addonConfig = this . appConfig [ 'ember-component-css' ] || { } ;
7575 this . classicStyleDir = this . addonConfig . classicStyleDir || 'component-styles' ;
76+ this . terseClassNames = Boolean ( this . addonConfig . terseClassNames ) ;
7677 this . allowedStyleExtensions = app . registry . extensionsForType ( 'css' ) . filter ( Boolean ) ;
7778 } ,
7879
80+ config : function ( enviroment ) {
81+ var config = {
82+ "ember-component-css" : {
83+ terseClassNames : false ,
84+ } ,
85+ } ;
86+ if ( enviroment === 'production' ) {
87+ config [ "ember-component-css" ] . terseClassNames = true ;
88+ }
89+ return config ;
90+ } ,
91+
7992 treeForAddon : function ( tree ) {
8093 if ( this . _namespacingIsEnabled ( ) ) {
8194 var allPodStyles = new Merge ( this . _allPodStyles , {
@@ -85,6 +98,7 @@ module.exports = {
8598
8699 var podNames = new ExtractNames ( allPodStyles , {
87100 classicStyleDir : this . classicStyleDir ,
101+ terseClassNames : this . terseClassNames ,
88102 annotation : 'Walk (ember-component-css extract class names from style paths)'
89103 } ) ;
90104
@@ -116,6 +130,7 @@ module.exports = {
116130 podStyles = new ProcessStyles ( podStyles , {
117131 extensions : this . allowedStyleExtensions ,
118132 classicStyleDir : this . classicStyleDir ,
133+ terseClassNames : this . terseClassNames ,
119134 annotation : 'Filter (ember-component-css process :--component with class names)'
120135 } ) ;
121136 }
0 commit comments