Skip to content

Commit

Permalink
fix(cli): export a browser bundle for generating css (#841)
Browse files Browse the repository at this point in the history
* fix: export a browser bundle for generating css

* Create popular-flowers-share.md
  • Loading branch information
ayuhito committed Sep 21, 2023
1 parent 61c7eed commit c417679
Show file tree
Hide file tree
Showing 9 changed files with 557 additions and 534 deletions.
5 changes: 5 additions & 0 deletions .changeset/popular-flowers-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fontsource-utils/cli": patch
---

fix(cli): export a browser bundle for generating css
24 changes: 18 additions & 6 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,25 @@
"module": "./dist/index.mjs",
"types": "./dist/index.d.cts",
"exports": {
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
"node": {
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
"default": {
"require": {
"types": "./dist/browser.d.cts",
"default": "./dist/browser.cjs"
},
"import": {
"types": "./dist/browser.d.mts",
"default": "./dist/browser.mjs"
}
}
},
"scripts": {
Expand Down
7 changes: 7 additions & 0 deletions packages/cli/src/browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export {
generateIconStaticCSS,
generateIconVariableCSS,
generateV1CSS,
generateV2CSS,
generateVariableCSS,
} from './google/css';

0 comments on commit c417679

Please sign in to comment.