Skip to content

Commit 807370d

Browse files
committed
fix custom header
1 parent ad3bc6b commit 807370d

File tree

3 files changed

+7
-13
lines changed

3 files changed

+7
-13
lines changed

core/scripts/tokens/index.mjs

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,7 @@ const {
2525
} = utils;
2626
import 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
3731
StyleDictionary.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
}

core/src/foundations/ionic.utility.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Do not edit directly, this file was auto-generated.
2+
13
@import "./ionic.vars";
24
@import "../themes/mixins";
35

core/src/foundations/ionic.vars.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Do not edit directly, this file was auto-generated.
2+
13
@use "../themes/functions.sizes" as font;
24
$token-primitives-neutral-100: var(--token-primitives-neutral-100, #f5f5f5);
35
$token-primitives-neutral-100-rgb: var(--token-primitives-neutral-100-rgb, 245, 245, 245);

0 commit comments

Comments
 (0)