@@ -25,13 +25,7 @@ const {
2525} = utils ;
2626import StyleDictionary from 'style-dictionary' ;
2727
28- // Register a custom file header
29- StyleDictionary . registerFileHeader ( {
30- name : 'custom-header' ,
31- fileHeader : ( defaultMessages = [ ] ) => {
32- return [ ...defaultMessages , 'Do not edit directly, this file was auto-generated.' ] ;
33- } ,
34- } ) ;
28+ const customHeader = `// Do not edit directly, this file was auto-generated.` ;
3529
3630// SCSS variables format
3731StyleDictionary . registerFormat ( {
@@ -83,6 +77,7 @@ StyleDictionary.registerFormat({
8377 // In v3, the header is added automatically by Style Dictionary.
8478 // The format function should only return the file content.
8579 return [
80+ customHeader + '\n\n' ,
8681 '@use "../themes/functions.sizes" as font;\n' ,
8782 prefixedVariables . join ( '\n' ) + '\n' ,
8883 ] . join ( '' ) ;
@@ -162,6 +157,7 @@ StyleDictionary.registerFormat({
162157 // In v3, the header is added automatically by Style Dictionary.
163158 // The format function should only return the file content.
164159 return [
160+ customHeader + '\n\n' ,
165161 '@import "./ionic.vars";\n@import "../themes/mixins";\n' ,
166162 finalOutput ,
167163 ] . join ( '' ) ;
@@ -179,16 +175,10 @@ const config = {
179175 {
180176 destination : "ionic.vars.scss" ,
181177 format : "scssVariablesFormat" ,
182- options : {
183- fileHeader : `custom-header` ,
184- } ,
185178 } ,
186179 {
187180 destination : "ionic.utility.scss" ,
188181 format : "cssUtilityClassesFormat" ,
189- options : {
190- fileHeader : `custom-header`
191- }
192182 }
193183 ]
194184 }
0 commit comments