Skip to content

Commit

Permalink
fix: style build missing custom rules (#147)
Browse files Browse the repository at this point in the history
Co-authored-by: jared-dickman <[email protected]>
  • Loading branch information
jared-dickman and jared-dickman authored Mar 15, 2024
1 parent 4450abd commit 3a66b26
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .stylelintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/
dist/
src/styles/style.css
src/styles/_variables.css
5 changes: 3 additions & 2 deletions scripts/build-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
echo '---------- Begin dist assets ----------'
DIR=$(cd "$(dirname "$0")"; pwd)

npm run tokens-to-css
vite build
cp $DIR/../src/styles/style.* $DIR/../dist
npm run tokens-to-css
cp $DIR/../src/styles/*.css $DIR/../dist
cp $DIR/../src/styles/style.ts $DIR/../dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'src/styles/style.css'
import 'src/styles/_variables.css'
import './global-navigation.css'
import { type IAvatarProps, Layout } from 'src/components'
import { Flex } from 'src/components'
Expand Down Expand Up @@ -96,4 +96,4 @@ export const GlobalNavigation = (props: IGlobalNavigationProps) => {
</Layout.Sider>
</Layout>
)
}
}
File renamed without changes.
4 changes: 2 additions & 2 deletions src/styles/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[styles.css](https://github.com/mParticle/aquarium/blob/main/src/styles/style.css) is a generated file, created from the design tokens in [GlobalTokens.json](https://github.com/mParticle/aquarium/blob/main/design/GlobalToken.json)
[_variables.css](https://github.com/mParticle/aquarium/blob/main/src/styles/_variables.css) is a generated file, created from the design tokens in [GlobalTokens.json](https://github.com/mParticle/aquarium/blob/main/design/GlobalToken.json)

When design updates the source-of-truth variables in figma, run the `Theme Buddy for Ant Design` plugin, which exports the Config Provider diff between our styles and the ant default

Expand All @@ -10,4 +10,4 @@ Then open the story `GetGlobalToken` to retrieve the latest global design token

Then paste that into [GlobalTokens.json](https://github.com/mParticle/aquarium/blob/main/design/GlobalToken.json)

These will then be converted into css variables on push, and committed via the [github action](https://github.com/mParticle/aquarium/blob/main/.github/workflows/tokens-to-css.yml)
These will then be converted into css variables on push, and committed via the [github action](https://github.com/mParticle/aquarium/blob/main/.github/workflows/tokens-to-css.yml)
2 changes: 1 addition & 1 deletion src/styles/style.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Do not edit directly
* Generated on Thu, 14 Mar 2024 23:33:29 GMT
* Generated on Fri, 15 Mar 2024 02:51:48 GMT
*/

export const Blue = "#1677ff";
Expand Down
4 changes: 2 additions & 2 deletions style-dictionary.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"transformGroup": "css",
"files": [
{
"destination": "src/styles/style.css",
"destination": "src/styles/_variables.css",
"format": "css/variables",
"options": {
"showFileHeader": false
Expand All @@ -23,4 +23,4 @@
]
}
}
}
}

0 comments on commit 3a66b26

Please sign in to comment.