Browse Source

chore: add support for exporting our colors as Swift files

pull/3152/head
Gabe Kangas 2 years ago
parent
commit
40de64fffe
No known key found for this signature in database
GPG Key ID: 4345B2060657F330
  1. 1
      .gitignore
  2. 24
      web/style-definitions/config.js

1
.gitignore vendored

@ -42,6 +42,7 @@ test/automated/browser/screenshots @@ -42,6 +42,7 @@ test/automated/browser/screenshots
lefthook.yml
test/automated/browser/cypress/screenshots
test/automated/browser/cypress/videos
web/style-definitions/build/
web/public/sw.js
web/public/workbox-*.js

24
web/style-definitions/config.js

@ -54,5 +54,29 @@ module.exports = { @@ -54,5 +54,29 @@ module.exports = {
},
],
},
'ios-swift': {
transforms: [
'attribute/cti',
'name/ti/camel',
'color/ColorSwiftUI',
'content/swift/literal',
'asset/swift/literal',
'size/swift/remToCGFloat',
'font/swift/literal',
],
buildPath: 'build/',
files: [
{
format: 'ios-swift/class.swift',
className: 'PlatformColor',
destination: 'Colors.swift',
filter: {
attributes: {
category: 'color',
},
},
},
],
},
},
};

Loading…
Cancel
Save