Repository navigation
Expand file tree
/
Copy pathsd.config.js
More file actions
52 lines (52 loc) · 1.48 KB
/
Copy pathsd.config.js
File metadata and controls
52 lines (52 loc) · 1.48 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
module.exports = {
source: ['tokens/**/*.json'],
platforms: {
css: {
transformGroup: 'css',
buildPath: 'src/styles/',
files: [
{
destination: 'variables.css',
format: 'css/variables',
filter: (token) =>
!token.filePath.includes('dark.json') &&
!token.name.startsWith('primary-purple') &&
!token.name.startsWith('primary-orange') &&
!token.name.startsWith('primary-green')
},
{
destination: 'dark-theme.css',
format: 'css/variables',
filter: (token) => token.filePath.includes('dark.json'),
options: {
selector: '[data-theme="dark"]'
}
},
{
destination: 'theme-purple.css',
format: 'css/variables',
filter: (token) => token.name.startsWith('primary-purple'),
options: {
selector: '[data-theme-color="purple"]'
}
},
{
destination: 'theme-orange.css',
format: 'css/variables',
filter: (token) => token.name.startsWith('primary-orange'),
options: {
selector: '[data-theme-color="orange"]'
}
},
{
destination: 'theme-green.css',
format: 'css/variables',
filter: (token) => token.name.startsWith('primary-green'),
options: {
selector: '[data-theme-color="green"]'
}
}
]
}
}
};