Skip to content

Commit

Permalink
chore(docs): remove unused files, rename for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
evwilkin committed Aug 5, 2024
1 parent 7b1dc2d commit 950c490
Show file tree
Hide file tree
Showing 11 changed files with 271 additions and 112,733 deletions.
28 changes: 4 additions & 24 deletions packages/module/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@ const build = (selector) => {
}
});

StyleDictionary.registerFormat({
name: 'json/flat',
formatter: function (dictionary) {
let tokens = {};
dictionary.allTokens.map((token) => {
// assign each token object to token.name
tokens[token.name] = token;
// attach references to build token chain
if (dictionary.usesReference(token.original.value)) {
token.references = dictionary.getReferences(token.original.value);
}
});
return JSON.stringify(tokens, null, 2);
}
});

StyleDictionary.registerFormat({
name: 'json/flat-categories',
formatter: function (dictionary) {
Expand Down Expand Up @@ -145,21 +129,17 @@ const build = (selector) => {
const paletteExtendedSD = StyleDictionary.extend(__dirname + '/config.palette-colors.json');
const chartsExtendedSD = StyleDictionary.extend(__dirname + '/config.charts.json');
const chartsDarkExtendedSD = StyleDictionary.extend(__dirname + '/config.charts.dark.json');
const allDefaultSD = StyleDictionary.extend(__dirname + '/config.all.default.json');
const allDarkSD = StyleDictionary.extend(__dirname + '/config.all.dark.json');
const semanticSD = StyleDictionary.extend(__dirname + '/config.semantic.json');
const semanticDarkSD = StyleDictionary.extend(__dirname + '/config.semantic.dark.json');
const layersSD = StyleDictionary.extend(__dirname + '/config.layers.json');
const layersDarkSD = StyleDictionary.extend(__dirname + '/config.layers.dark.json');

// Build all
defaultExtendedSD.buildAllPlatforms();
darkExtendedSD.buildAllPlatforms();
paletteExtendedSD.buildAllPlatforms();
chartsExtendedSD.buildAllPlatforms();
chartsDarkExtendedSD.buildAllPlatforms();
allDefaultSD.buildAllPlatforms();
allDarkSD.buildAllPlatforms();
semanticSD.buildAllPlatforms();
semanticDarkSD.buildAllPlatforms();
layersSD.buildAllPlatforms();
layersDarkSD.buildAllPlatforms();

console.log('\n============================');
console.log('\nBuild completed.');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"prefix": "pf-t",
"files": [
{
"destination": "semantic-tokens-dark.json",
"destination": "token-layers-dark.json",
"format": "json/flat-categories",
"options": {
"outputReferences": false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"prefix": "pf-t",
"files": [
{
"destination": "semantic-tokens-default.json",
"destination": "token-layers-default.json",
"format": "json/flat-categories",
"options": {
"outputReferences": false
Expand Down
10 changes: 3 additions & 7 deletions packages/module/patternfly-docs/content/all-patternfly-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ section: tokens
id: All PatternFly tokens
---


import * as defaultTokens from './semantic-tokens-default.json';
import * as darkTokens from './semantic-tokens-dark.json';
import * as defaultTokens from './token-layers-default.json';
import * as darkTokens from './token-layers-dark.json';
import { TokensTable } from './tokensTable.js';
import { TokensTableCategories } from './tokensTableCategories.js';

<!-- <TokensTable tokenJson={{default: defaultTokens, dark: darkTokens}} /> -->

<TokensTableCategories tokenJson={{default: defaultTokens, dark: darkTokens}} />
<TokensTable tokenJson={{default: defaultTokens, dark: darkTokens}} />
Loading

0 comments on commit 950c490

Please sign in to comment.