@@ -76,26 +76,7 @@ class ThemeLibrary extends Project {
7676 // Apply builder excludes to all styles but "runtime"
7777 const excludes = style === "runtime" ? [ ] : this . getBuilderResourcesExcludes ( ) ;
7878
79- let reader = resourceFactory . createReader ( {
80- fsBasePath : this . getSourcePath ( ) ,
81- virBasePath : "/resources/" ,
82- name : `Runtime resources reader for theme-library project ${ this . getName ( ) } ` ,
83- project : this ,
84- excludes
85- } ) ;
86- if ( this . _testPathExists ) {
87- const testReader = resourceFactory . createReader ( {
88- fsBasePath : fsPath . join ( this . getRootPath ( ) , this . _testPath ) ,
89- virBasePath : "/test-resources/" ,
90- name : `Runtime test-resources reader for theme-library project ${ this . getName ( ) } ` ,
91- project : this ,
92- excludes
93- } ) ;
94- reader = resourceFactory . createReaderCollection ( {
95- name : `Reader collection for theme-library project ${ this . getName ( ) } ` ,
96- readers : [ reader , testReader ]
97- } ) ;
98- }
79+ const reader = this . _getReader ( excludes ) ;
9980 const writer = this . _getWriter ( ) ;
10081
10182 return resourceFactory . createReaderCollectionPrioritized ( {
@@ -115,7 +96,8 @@ class ThemeLibrary extends Project {
11596 * @returns {@ui5/fs/DuplexCollection } DuplexCollection
11697 */
11798 getWorkspace ( ) {
118- const reader = this . getReader ( ) ;
99+ const excludes = this . getBuilderResourcesExcludes ( ) ;
100+ const reader = this . _getReader ( excludes ) ;
119101
120102 const writer = this . _getWriter ( ) ;
121103 return resourceFactory . createWorkspace ( {
@@ -124,6 +106,30 @@ class ThemeLibrary extends Project {
124106 } ) ;
125107 }
126108
109+ _getReader ( excludes ) {
110+ let reader = resourceFactory . createReader ( {
111+ fsBasePath : this . getSourcePath ( ) ,
112+ virBasePath : "/resources/" ,
113+ name : `Runtime resources reader for theme-library project ${ this . getName ( ) } ` ,
114+ project : this ,
115+ excludes
116+ } ) ;
117+ if ( this . _testPathExists ) {
118+ const testReader = resourceFactory . createReader ( {
119+ fsBasePath : fsPath . join ( this . getRootPath ( ) , this . _testPath ) ,
120+ virBasePath : "/test-resources/" ,
121+ name : `Runtime test-resources reader for theme-library project ${ this . getName ( ) } ` ,
122+ project : this ,
123+ excludes
124+ } ) ;
125+ reader = resourceFactory . createReaderCollection ( {
126+ name : `Reader collection for theme-library project ${ this . getName ( ) } ` ,
127+ readers : [ reader , testReader ]
128+ } ) ;
129+ }
130+ return reader ;
131+ }
132+
127133 _getWriter ( ) {
128134 if ( ! this . _writer ) {
129135 this . _writer = resourceFactory . createAdapter ( {
0 commit comments