Skip to content

Commit

Permalink
build!: remove some tokens from build (#1581)
Browse files Browse the repository at this point in the history
* refactor: remove references to unexported files

* build!: no longer include some tokens in build
  • Loading branch information
jinlee93 authored Apr 4, 2023
1 parent 1b54dce commit 3cf44ff
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 736 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ yarn add @chanzuckerberg/eds
Import the EDS stylesheet and tokens somewhere in your app, e.g. an `init.ts` or `app.ts` file:

```js
import '@chanzuckerberg/eds/lib/index.css';
import '@chanzuckerberg/eds/index.css';
// optionally import EDS font faces
// import '@chanzuckerberg/eds/lib/tokens/fonts.css';
// import '@chanzuckerberg/eds/fonts.css';
```

EDS components are designed for the Graphik font, but you may use other fonts by re-defining the `--eds-font-family-primary` CSS property. We also surface an `--eds-font-size-base` property to set your base `rem` font size, eg:
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"types": "lib/index.d.ts",
"sideEffects": [
"lib/tokens/css/variables.css",
"lib/index.css",
"lib/tokens/fonts.css"
],
"publishConfig": {
Expand All @@ -36,13 +36,12 @@
"scripts": {
"build": "yarn build:clean && yarn build:tokens && yarn build:js && yarn copy-fonts-to-lib",
"build:clean": "rm -rf lib/",
"build:tokens": "rm -rf src/tokens-dist/ && node ./style-dictionary.config.js && yarn copy-tokens-to-lib && yarn prettier-tokens-dist",
"build:tokens": "rm -rf src/tokens-dist/ && node ./style-dictionary.config.js && yarn prettier-tokens-dist",
"build:js": "rollup --config",
"build:storybook": "build-storybook -o storybook-static -s src/design-tokens/tier-1-definitions/fonts",
"build:styles": "postcss \"src/components/**/*.css\" --dir lib/ --base src/ --verbose",
"chromatic": "chromatic",
"copy-fonts-to-lib": "copyfiles -u 3 src/design-tokens/tier-1-definitions/fonts.css src/design-tokens/tier-1-definitions/fonts/**/* lib/tokens",
"copy-tokens-to-lib": "copyfiles -u 2 src/tokens-dist/**/* lib/tokens",
"create-component": "plop",
"deploy:docs": "storybook-to-ghpages --ci",
"lint": "yarn run lint:styles && yarn run lint:scripts",
Expand Down
3 changes: 1 addition & 2 deletions src/components/Icon/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ interface IconPropsBase {
* The SVG Color, expects a valid css color (hex, rgb, etc.).
*
* Recommendation: if `currentColor` isn't sufficient,
* use `EdsThemeColor` tokens from
* `@chanzuckerberg/eds/lib/tokens/colors.ts`
* style the fill with Tailwind: https://tailwindcss.com/docs/fill
*/
color?: string;
/**
Expand Down
Loading

0 comments on commit 3cf44ff

Please sign in to comment.