Merged in feat/update-tokens (pull request #1611)
feat(SW-2027): update variables.json * feat(SW-2027): update variables.json * fix(SW-2027). replace old tokens * fix(SW-2027): remove uppercase check Approved-by: Michael Zetterberg Approved-by: Erik Tiekstra
This commit is contained in:
@@ -62,14 +62,22 @@ json.collections.forEach((collection) => {
|
||||
switch (variable.type) {
|
||||
case 'boolean':
|
||||
if (typeof variable.value === 'boolean') {
|
||||
// Handle text transform UPPERCASE
|
||||
if (/upper(\s+)?case|text transform/i.test(variable.name)) {
|
||||
// Handle text transform
|
||||
if (/text transform/i.test(variable.name)) {
|
||||
token = variable.name.replace(
|
||||
/upper(\s+)?case|text transform/i,
|
||||
/text transform/i,
|
||||
'Text-Transform'
|
||||
)
|
||||
value = variable.value ? 'uppercase' : 'unset'
|
||||
}
|
||||
// Handle text decoration
|
||||
else if (/text decoration/i.test(variable.name)) {
|
||||
token = variable.name.replace(
|
||||
/text decoration/i,
|
||||
'Text-Decoration'
|
||||
)
|
||||
value = variable.value ? 'underline' : 'unset'
|
||||
}
|
||||
} else {
|
||||
throw new Error(
|
||||
`Bad variable value input type. Expected 'boolean' got '${variable.type}'`
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user