@@ -119,12 +119,12 @@ Utils = {
119
119
let content = html ;
120
120
121
121
if ( template . css ) {
122
- const css = Utils . readFile ( template . css ) ;
122
+ const css = Utils . readFile ( template . css , template . packageFolderName ) ;
123
123
content = juice . inlineContent ( content , css , juiceOpts ) ;
124
124
}
125
125
126
126
if ( template . scss ) {
127
- const scss = Utils . toCSS ( template . scss ) ;
127
+ const scss = Utils . toCSS ( template . scss , template . packageFolderName ) ;
128
128
content = juice . inlineContent ( content , scss , juiceOpts ) ;
129
129
}
130
130
@@ -141,16 +141,16 @@ Utils = {
141
141
} ,
142
142
143
143
readFile : function ( relativePathFromApp , packageFolderName ) {
144
- const file = packageFolderName ?
144
+ const file = packageFolderName ?
145
145
path . join ( PACKAGES_ROOT , packageFolderName , relativePathFromApp )
146
146
: path . join ( ROOT , relativePathFromApp ) ;
147
147
148
148
try {
149
149
return fs . readFileSync ( file , {
150
150
encoding : 'utf8'
151
151
} ) ;
152
-
153
152
} catch ( ex ) {
153
+ Utils . Logger . error ( `Could not find file: ${ file } , ${ ex . message } ` , TAG ) ;
154
154
throw new Meteor . Error ( 500 , `Could not find file: ${ file } ` , ex . message ) ;
155
155
}
156
156
} ,
@@ -163,7 +163,7 @@ Utils = {
163
163
}
164
164
165
165
const file = packageFolderName ?
166
- path . join ( PACKAGES_ROOT , packageName , relativePathFromApp )
166
+ path . join ( PACKAGES_ROOT , packageFolderName , scss )
167
167
: path . join ( ROOT , scss ) ;
168
168
const sass = Package [ 'chrisbutler:node-sass' ] . sass ;
169
169
0 commit comments