-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdesktop-browsers-dictionary.config.js
More file actions
60 lines (59 loc) · 2.32 KB
/
desktop-browsers-dictionary.config.js
File metadata and controls
60 lines (59 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { transformGroups, logBrokenReferenceLevels, logVerbosityLevels, logWarningLevels } from 'style-dictionary/enums';
import cssVariablesShadowDom from './src/formats/css-variables-shadow-dom.js';
import onboardingThemeClasses from './src/formats/css-onboarding-theme-classes.js';
import fileHeader from './dist/src/utils/file-header.js';
export default {
source: [
'dist/src/properties/web/serp-legacy/sds-colors.js',
'dist/src/properties/web/theme/colors.js',
'dist/src/properties/web/desktop-browsers/theme.js',
'dist/src/properties/web/base/colors.{js,json}',
'dist/src/properties/web/desktop-browsers/onboarding.{js,json}',
],
hooks: {
formats: {
'css/variables-shadow-dom': cssVariablesShadowDom,
'onboarding-theme-classes': onboardingThemeClasses,
},
},
log: {
warnings: logWarningLevels.warn, // 'warn' | 'error' | 'disabled'
verbosity: logVerbosityLevels.verbose, // 'default' | 'silent' | 'verbose'
errors: {
brokenReferences: logBrokenReferenceLevels.throw, // 'throw' | 'console'
},
},
platforms: {
css: {
prefix: 'ds',
transformGroup: transformGroups.css,
buildPath: 'build/',
files: [
{
destination: 'desktop-browsers/tokens.css',
format: 'css/variables-shadow-dom',
// Exclude base/colors and desktop-browsers/onboarding tokens
filter: (token) =>
!token.filePath?.includes('base/colors') &&
!token.filePath?.includes('desktop-browsers/onboarding') &&
!token.filePath?.includes('theme/colors'),
options: {
outputReferences: true,
showFileHeader: true,
},
},
{
destination: 'desktop-browsers/onboarding.css',
format: 'onboarding-theme-classes',
options: {
outputReferences: false,
showFileHeader: true,
},
},
],
options: {
...fileHeader,
},
},
},
};