Skip to content

Commit

Permalink
rm scss for v8
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasoppermann committed Apr 9, 2024
1 parent 93e8ac1 commit 1a232e6
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 116 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-carrots-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/primitives': minor
---

Removes scss output for v8 tokens
3 changes: 1 addition & 2 deletions scripts/buildTokens.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type StyleDictionary from 'style-dictionary'
import {PrimerStyleDictionary} from '~/src/PrimerStyleDictionary'
import {copyFromDir} from '~/src/utilities'
import {deprecatedJson, css, docJson, scss, fallbacks} from '~/src/platforms'
import {deprecatedJson, css, docJson, fallbacks} from '~/src/platforms'
import type {ConfigGeneratorOptions, StyleDictionaryConfigGenerator} from '~/src/types/StyleDictionaryConfigGenerator'
import type {TokenBuildInput} from '~/src/types/TokenBuildInput'
import glob from 'fast-glob'
Expand All @@ -26,7 +26,6 @@ const getStyleDictionaryConfig: StyleDictionaryConfigGenerator = (
include,
platforms: {
css: css(`css/${filename}.css`, options.prefix, options.buildPath, {themed: options.themed}),
scss: scss(`scss/${filename}.scss`, options.prefix, options.buildPath),
docJson: docJson(`docs/${filename}.json`, options.prefix, options.buildPath),
fallbacks: fallbacks(`fallbacks/${filename}.json`, options.prefix, options.buildPath),
...platforms,
Expand Down
8 changes: 1 addition & 7 deletions src/PrimerStyleDictionary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import {
typographyToCss,
} from './transformers'
import {
scssMixinCssVariables,
javascriptCommonJs,
javascriptEsm,
typescriptExportDefinition,
Expand Down Expand Up @@ -67,11 +66,6 @@ StyleDictionary.registerFormat({
formatter: cssVariables,
})

StyleDictionary.registerFormat({
name: 'scss/mixin-css-variables',
formatter: scssMixinCssVariables,
})

StyleDictionary.registerFormat({
name: 'javascript/esm',
formatter: javascriptEsm,
Expand Down Expand Up @@ -220,7 +214,7 @@ StyleDictionary.registerTransform({
* @name {@link PrimerStyleDictionary}
* @description Returns style dictionary object with primer preset that includes parsers, formats and transformers
* @parsers [w3cJsonParser](https://github.com/primer/primitives/blob/main/config//parsers/w3c-json-parser.ts)
* @formats [scss/mixin-css-variables](https://github.com/primer/primitives/blob/main/config/formats/scss-mixin-css-variables.ts), [javascript/esm](https://github.com/primer/primitives/blob/main/config/formats/javascript-esm.ts), [javascript/commonJs](https://github.com/primer/primitives/blob/main/config/formats/javascript-commonJs.ts), [typescript/export-definition](https://github.com/primer/primitives/blob/main/config/formats/typescript-export-defition.ts)
* @formats [javascript/esm](https://github.com/primer/primitives/blob/main/config/formats/javascript-esm.ts), [javascript/commonJs](https://github.com/primer/primitives/blob/main/config/formats/javascript-commonJs.ts), [typescript/export-definition](https://github.com/primer/primitives/blob/main/config/formats/typescript-export-defition.ts)
* @transformers [color/rgbAlpha](https://github.com/primer/primitives/blob/main/config/tranformers/color-to-rgb-alpha.ts), [color/hexAlpha](https://github.com/primer/primitives/blob/main/config/tranformers/color-to-hex-alpha.ts), [color/hex](https://github.com/primer/primitives/blob/main/config/tranformers/color-to-hex6.ts), [json/deprecated](https://github.com/primer/primitives/blob/main/config/tranformers/json-deprecated.ts), [name/pathToDotNotation](https://github.com/primer/primitives/blob/main/config/tranformers/name-path-to-dot-notation.ts)
*/
export const PrimerStyleDictionary: StyleDictionary.Core = StyleDictionary
1 change: 0 additions & 1 deletion src/formats/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ export {javascriptEsm} from './javascriptEsm'
export {jsonNestedPrefixed} from './jsonNestedPrefixed'
export {jsonOneDimensional} from './jsonOneDimensional'
export {jsonPostCssFallback} from './jsonPostCssFallback'
export {scssMixinCssVariables} from './scssMixinCssVariables'
export {typescriptExportDefinition} from './typescriptExportDefinition'
30 changes: 0 additions & 30 deletions src/formats/scssMixinCssVariables.test.ts

This file was deleted.

25 changes: 0 additions & 25 deletions src/formats/scssMixinCssVariables.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/platforms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ export {fallbacks} from './fallbacks'
export {figma} from './figma'
export {javascript} from './javascript'
export {json} from './json'
export {scss} from './scss'
export {typeDefinitions} from './typeDefinitions'
export {typescript} from './typescript'
50 changes: 0 additions & 50 deletions src/platforms/scss.ts

This file was deleted.

0 comments on commit 1a232e6

Please sign in to comment.