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

rm scss for v8 #873

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.

Loading