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

fix: style build missing custom rules #147

Merged
merged 2 commits into from
Mar 15, 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
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 @@
]
}
}
}
}
Loading