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

backstage: Add Sass token target #1865

Merged
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
2 changes: 2 additions & 0 deletions apps/dictionary/src/build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {StyleDictionaryPackageWithTransforms} from './config/styledictionary.js';
import {getBrandSourcesAndIncludes, getBrandNames} from './utils.js';
import {cssConfigForBrand} from './config/platforms/css.js';
import {sassConfigForBrand} from './config/platforms/sass.js';
import {toolingConfigForBrand} from './config/platforms/tooling.js';

const brands = getBrandNames();
Expand Down Expand Up @@ -32,6 +33,7 @@ export async function buildForBrand(brand) {
},
platforms: {
css: cssConfigForBrand(brand),
sass: sassConfigForBrand(brand),
tooling: toolingConfigForBrand(brand),
},
};
Expand Down
26 changes: 26 additions & 0 deletions apps/dictionary/src/config/platforms/sass.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import path from 'node:path';
import {sharedTransformers} from '../transformers.js';

function sassConfigForBrand(brand) {
const parentBrand = brand.split('/').slice(-1);
return {
transformGroup: 'scss',
transforms: [
...sharedTransformers,
'value/figma-shadow-shorthand',
'value/transformSVG',
],
buildPath: path.join(process.cwd(), '../../components/'),
files: [
{
destination: `o-private-foundation/src/scss/tokens/${parentBrand}.scss`,
format: 'scss/map-flat',
options: {
outputReferences: false,
},
},
],
};
}

export {sassConfigForBrand};
496 changes: 496 additions & 0 deletions components/o-private-foundation/src/scss/tokens/core.scss

Large diffs are not rendered by default.

355 changes: 355 additions & 0 deletions components/o-private-foundation/src/scss/tokens/internal.scss

Large diffs are not rendered by default.

470 changes: 470 additions & 0 deletions components/o-private-foundation/src/scss/tokens/professional.scss

Large diffs are not rendered by default.

424 changes: 424 additions & 0 deletions components/o-private-foundation/src/scss/tokens/sustainable-views.scss

Large diffs are not rendered by default.

374 changes: 374 additions & 0 deletions components/o-private-foundation/src/scss/tokens/whitelabel.scss

Large diffs are not rendered by default.

Loading