File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,11 @@ See [webfonts-generator#csstemplate](https://github.com/sunflowerdeath/webfonts-
117
117
If true the font is encoded in base64 and embedded inside the ` @font-face ` declaration, otherwise font files are written to disk.
118
118
Default: ` false `
119
119
120
+ ##### ` scssFile ` , Boolean
121
+
122
+ If true, the build process will export a .scss file in the same path as the .css file.
123
+ Default: ` false `
124
+
120
125
##### ` hashLength ` , Number
121
126
122
127
Optional. The length of hash in ` fileName ` .
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ module.exports = function (content) {
98
98
baseSelector : fontConfig . baseSelector || '.icon' ,
99
99
classPrefix : 'classPrefix' in fontConfig ? fontConfig . classPrefix : 'icon-'
100
100
} ,
101
+ scssFile : fontConfig . scssFile || false ,
101
102
dest : fontConfig . dest || '' ,
102
103
html : fontConfig . html || false ,
103
104
htmlDest : fontConfig . htmlDest || undefined ,
@@ -143,6 +144,11 @@ module.exports = function (content) {
143
144
generatorOptions . dest = path . resolve ( this . context , fontConfig . dest ) ;
144
145
}
145
146
147
+ // Spit out SCSS file to same path as CSS file to easily use mixins (scssFile must be true)
148
+ if ( fontConfig . scssFile === true ) {
149
+ generatorOptions . cssDest = path . resolve ( this . context , fontConfig . dest , fontConfig . fontName + '.scss' ) ;
150
+ }
151
+
146
152
// svgicons2svgfont stuff
147
153
var keys = [
148
154
'fixedWidth' ,
You can’t perform that action at this time.
0 commit comments