Skip to content

Instantly share code, notes, and snippets.

@ChucKN0risK
Created February 22, 2022 17:17
Show Gist options
  • Save ChucKN0risK/e2d35d8bc6e15c3f8589a8723cca9806 to your computer and use it in GitHub Desktop.
Save ChucKN0risK/e2d35d8bc6e15c3f8589a8723cca9806 to your computer and use it in GitHub Desktop.
Example Config For Nortal
{
"repository": "@nortal/NEOM-Core",
"personalAccessToken": "",
"rules": [
{
"name": "Design Tokens / Colors",
"path": "assets/style/colors.css",
"filter": {
"types": ["color"]
},
"parsers": [
{
"name": "to-css-custom-properties",
"options": {
"formatTokens":{
"color": "hsl"
}
}
}
]
},
{
"name": "Design Tokens / Icons",
"path": "assets/icons",
"filter": {
"types": ["vector"]
},
"parsers": [
{
"name": "svgo",
"options": {
"svgo": {
"plugins": [
{
"removeDimensions": true
},
{
"removeAttrs": {
"attrs": "*:(fill|stroke)"
}
},
{
"addAttributesToSVGElement": {
"attributes": ["width=\"1em\"", "height=\"1em\""]
}
}
]
}
}
},
{
"name": "name-assets-files-by-pattern",
"options": {
"pattern": "{{name}}.{{format}}"
}
}
]
},
{
"name": "Assets / Fonts",
"path": "assets/fonts",
"filter": {
"types": ["font"]
},
"parsers": [
{
"name": "convert-font",
"options": {
"formats": ["woff2", "woff"]
}
}
]
},
{
"name": "Design Tokens / Fonts",
"path": "assets/style/fonts.css",
"filter": {
"types": ["font"]
},
"parsers": [
{
"name": "to-css-font-import",
"options": {
"formats": ["woff2", "woff"],
"includeFontWeight": false,
"fontsPath": "../fonts/"
}
}
]
},
{
"name": "Design Tokens / Text Styles",
"path": "assets/style/typography.css",
"filter": {
"types": ["textStyle"]
},
"parsers": [
{
"name": "to-css-text-style",
"options": {
"exclude": ["color", "text-indent", "vertical-align", "text-align"],
"suffix": "-text-style",
"relativeLineHeight": true,
"genericFamily": "serif"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment