diff --git a/.stylelintignore b/.stylelintignore index 0bbf6edf4..add8ba4c3 100644 --- a/.stylelintignore +++ b/.stylelintignore @@ -1,3 +1,3 @@ node_modules/ dist/ -src/styles/style.css \ No newline at end of file +src/styles/_variables.css \ No newline at end of file diff --git a/scripts/build-dist.sh b/scripts/build-dist.sh index 8aa000074..024cba38a 100644 --- a/scripts/build-dist.sh +++ b/scripts/build-dist.sh @@ -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 \ No newline at end of file +npm run tokens-to-css +cp $DIR/../src/styles/*.css $DIR/../dist +cp $DIR/../src/styles/style.ts $DIR/../dist \ No newline at end of file diff --git a/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx b/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx index aea5aa071..0cb5c48f3 100644 --- a/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx +++ b/src/components/navigation/GlobalNavigation/GlobalNavigation.tsx @@ -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' @@ -96,4 +96,4 @@ export const GlobalNavigation = (props: IGlobalNavigationProps) => { ) -} +} \ No newline at end of file diff --git a/src/styles/style.css b/src/styles/_variables.css similarity index 100% rename from src/styles/style.css rename to src/styles/_variables.css diff --git a/src/styles/readme.md b/src/styles/readme.md index 647c377c2..9bb9f6543 100644 --- a/src/styles/readme.md +++ b/src/styles/readme.md @@ -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 @@ -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) \ No newline at end of file diff --git a/src/styles/style.ts b/src/styles/style.ts index 4a1f5abb5..ac92d0597 100644 --- a/src/styles/style.ts +++ b/src/styles/style.ts @@ -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"; diff --git a/style-dictionary.json b/style-dictionary.json index afea59620..c6f3c7a03 100644 --- a/style-dictionary.json +++ b/style-dictionary.json @@ -5,7 +5,7 @@ "transformGroup": "css", "files": [ { - "destination": "src/styles/style.css", + "destination": "src/styles/_variables.css", "format": "css/variables", "options": { "showFileHeader": false @@ -23,4 +23,4 @@ ] } } -} +} \ No newline at end of file