Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mob 33633 several files for token type #53

Merged
merged 7 commits into from
Sep 25, 2023
6 changes: 3 additions & 3 deletions Demo/.figmagen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ tokens:
file: https://www.figma.com/file/W6dy4CFSZWUVpVnSzNZIxA/FigmaGen-Tokens-Demo
templates:
colors:
destination: FigmaGenDemo/Generated/ColorTokens.swift
templateOptions:
publicAccess: true
- destination: FigmaGenDemo/Generated/ColorTokens.swift
templateOptions:
publicAccess: true
baseColors:
destination: FigmaGenDemo/Generated/BaseColorTokens.swift
templateOptions:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"info" : {
"version" : 1,
"author" : "FigmaGen"
},
"properties" : {
"preserves-vector-representation" : false
}
}
86 changes: 51 additions & 35 deletions Sources/FigmaGen/Commands/TokensCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,46 +223,62 @@ extension TokensCommand {

// MARK: - Instance Properties

// !!! Important note !!!
// For CLI usage of FigmaGen we don't support multiple templates for any token type.
var configuration: TokensConfiguration {
TokensConfiguration(
file: resolveFileConfiguration(),
accessToken: resolveAccessTokenConfiguration(),
templates: TokensTemplateConfiguration(
colors: TokensTemplateConfiguration.Template(
template: colorsTemplate.value,
templateOptions: resolveTemplateOptions(colorsTemplateOptions.value),
destination: colorsDestination.value
),
baseColors: TokensTemplateConfiguration.Template(
template: baseColorsTemplate.value,
templateOptions: resolveTemplateOptions(baseColorsTemplateOptions.value),
destination: baseColorsDestination.value
),
fontFamilies: TokensTemplateConfiguration.Template(
template: fontFamiliesTemplate.value,
templateOptions: resolveTemplateOptions(fontFamiliesTemplateOptions.value),
destination: fontFamiliesDestination.value
),
typographies: TokensTemplateConfiguration.Template(
template: typographiesTemplate.value,
templateOptions: resolveTemplateOptions(typographiesTemplateOptions.value),
destination: typographiesDestination.value
),
boxShadows: TokensTemplateConfiguration.Template(
template: boxShadowsTemplate.value,
templateOptions: resolveTemplateOptions(boxShadowsTemplateOptions.value),
destination: boxShadowsDestination.value
),
theme: TokensTemplateConfiguration.Template(
template: themeTemplate.value,
templateOptions: resolveTemplateOptions(themeTemplateOptions.value),
destination: themeDestination.value
),
spacing: TokensTemplateConfiguration.Template(
template: spacingTemplate.value,
templateOptions: resolveTemplateOptions(spacingTemplateOptions.value),
destination: spacingDestination.value
)
colors: [
TokensTemplateConfiguration.Template(
template: colorsTemplate.value,
templateOptions: resolveTemplateOptions(colorsTemplateOptions.value),
destination: colorsDestination.value
)
],
baseColors: [
TokensTemplateConfiguration.Template(
template: baseColorsTemplate.value,
templateOptions: resolveTemplateOptions(baseColorsTemplateOptions.value),
destination: baseColorsDestination.value
)
],
fontFamilies: [
TokensTemplateConfiguration.Template(
template: fontFamiliesTemplate.value,
templateOptions: resolveTemplateOptions(fontFamiliesTemplateOptions.value),
destination: fontFamiliesDestination.value
)
],
typographies: [
TokensTemplateConfiguration.Template(
template: typographiesTemplate.value,
templateOptions: resolveTemplateOptions(typographiesTemplateOptions.value),
destination: typographiesDestination.value
)
],
boxShadows: [
TokensTemplateConfiguration.Template(
template: boxShadowsTemplate.value,
templateOptions: resolveTemplateOptions(boxShadowsTemplateOptions.value),
destination: boxShadowsDestination.value
)
],
theme: [
TokensTemplateConfiguration.Template(
template: themeTemplate.value,
templateOptions: resolveTemplateOptions(themeTemplateOptions.value),
destination: themeDestination.value
)
],
spacing: [
TokensTemplateConfiguration.Template(
template: spacingTemplate.value,
templateOptions: resolveTemplateOptions(spacingTemplateOptions.value),
destination: spacingDestination.value
)
]
)
)
}
Expand Down
Loading
Loading