Skip to content

Commit 631f369

Browse files
committed
chore(ui): reduce prod deps
1 parent e35206c commit 631f369

10 files changed

Lines changed: 58 additions & 70 deletions

File tree

apps/site/styles/index.css

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@
66
* @see https://marketplace.visualstudio.com/items?itemName=stylelint.vscode-stylelint
77
*/
88

9-
@import '@node-core/ui-components/styles/index.css';
9+
@import 'tailwindcss';
10+
@import '../node_modules/@node-core/ui-components/src/styles/index.css';
1011
@import '@node-core/rehype-shiki/index.css';
11-
@import './locales.css';
12+
13+
/**
14+
* To enhance readability for Korean users, line spacing is increased,
15+
* line breaks in the middle of words are prevented, and long words are
16+
* managed to avoid disrupting the layout.
17+
*/
18+
html[lang='ko'] {
19+
@apply leading-7
20+
break-words
21+
break-keep;
22+
}

apps/site/styles/locales.css

Lines changed: 0 additions & 10 deletions
This file was deleted.

apps/site/turbo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"extends": ["//"],
44
"tasks": {
55
"dev": {
6-
"dependsOn": ["build:blog-data"],
6+
"dependsOn": ["build:blog-data", "build:twoslash-fsmap", "^build"],
77
"cache": false,
88
"persistent": true,
99
"env": [

apps/site/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"$schema": "https://openapi.vercel.sh/vercel.json",
3-
"installCommand": "pnpm install --prod --frozen-lockfile",
3+
"installCommand": "pnpm install --frozen-lockfile",
44
"ignoreCommand": "[[ \"$VERCEL_GIT_COMMIT_REF\" =~ \"^dependabot/.*\" || \"$VERCEL_GIT_COMMIT_REF\" =~ \"^gh-readonly-queue/.*\" ]]"
55
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"name": "Node.js Website Team and Contributors"
1414
},
1515
"scripts": {
16-
"compile": "turbo compile",
1716
"build": "turbo build",
1817
"cloudflare:deploy": "turbo cloudflare:deploy",
1918
"cloudflare:preview": "turbo cloudflare:preview",
@@ -66,4 +65,4 @@
6665
"onFail": "error"
6766
}
6867
}
69-
}
68+
}

packages/rehype-shiki/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
"directory": "packages/rehype-shiki"
2121
},
2222
"scripts": {
23-
"compile:ts": "tsc",
24-
"compile": "node --run compile:ts",
25-
"release": "node --run compile",
23+
"build:ts": "tsc",
24+
"build": "node --run build:ts",
25+
"release": "node --run build",
2626
"lint": "node --run lint:js",
2727
"lint:fix": "node --run lint:js:fix",
2828
"lint:js": "eslint \"**/*.mjs\"",

packages/ui-components/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ compiled outputs and keep them updated while you work.
1717
```bash
1818
# From nodejs.org/packages/ui-components
1919
pnpm install
20-
node --run compile:watch
20+
node --run build:watch
2121

2222
# In another terminal, still in nodejs.org/packages/ui-components
2323
npm link
@@ -26,5 +26,5 @@ npm link
2626
npm link @node-core/ui-components
2727
```
2828

29-
The `compile:watch` script keeps `dist/` up to date so consumers resolve compiled
29+
The `build:watch` script keeps `dist/` up to date so consumers resolve compiled
3030
CSS and JavaScript instead of the raw Tailwind source.

packages/ui-components/package.json

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,32 @@
11
{
22
"name": "@node-core/ui-components",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"type": "module",
55
"exports": {
6-
"./*": {
7-
"rolldown": [
8-
"./dist/*",
9-
"./dist/*.js",
10-
"./dist/*/index.js"
11-
],
12-
"default": [
13-
"./src/*",
14-
"./src/*.tsx",
15-
"./src/*/index.tsx",
16-
"./src/*.ts",
17-
"./src/*/index.ts"
18-
]
19-
}
6+
"./*": [
7+
"./dist/*",
8+
"./dist/*.js",
9+
"./dist/*/index.js"
10+
]
2011
},
2112
"repository": {
2213
"type": "git",
2314
"url": "https://github.com/nodejs/nodejs.org",
2415
"directory": "packages/ui-components"
2516
},
2617
"scripts": {
27-
"compile:ts": "tsc",
28-
"compile:css": "postcss --dir dist --base src \"src/**/*.module.css\" src/styles/index.css",
29-
"compile": "node --run compile:ts && node --run compile:css",
30-
"compile:watch": "concurrently -k \"node --run compile:ts -- --watch\" \"node --run compile:css -- --watch\"",
31-
"release": "node --run compile",
18+
"build": "node --run build:ts && node --run build:css",
19+
"build:css": "postcss --dir dist --base src \"src/**/*.module.css\" src/styles/index.css",
20+
"build:ts": "tsc",
21+
"build:watch": "concurrently -k \"node --run build:ts -- --watch\" \"node --run build:css -- --watch\"",
3222
"lint": "node --run lint:js && node --run lint:css",
3323
"lint:css": "stylelint \"**/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache",
3424
"lint:css:fix": "node --run lint:css -- --fix",
3525
"lint:fix": "node --run lint:js:fix && node --run lint:css:fix",
3626
"lint:js": "eslint \"**/*.{js,mjs,ts,tsx}\"",
3727
"lint:js:fix": "node --run lint:js -- --fix",
3828
"lint:types": "tsc --noEmit",
29+
"release": "node --run build",
3930
"storybook": "cross-env NODE_NO_WARNINGS=1 storybook dev -p 6006 --quiet",
4031
"storybook:build": "cross-env NODE_NO_WARNINGS=1 storybook build --quiet --webpack-stats-json",
4132
"test": "node --run test:unit",
@@ -54,15 +45,9 @@
5445
"@radix-ui/react-separator": "^1.1.8",
5546
"@radix-ui/react-tabs": "^1.1.13",
5647
"@radix-ui/react-tooltip": "^1.2.8",
57-
"@tailwindcss/postcss": "~4.3.0",
58-
"@types/react": "catalog:",
5948
"@vcarl/remark-headings": "~0.1.0",
6049
"classnames": "catalog:",
61-
"postcss-calc": "10.1.1",
62-
"postcss-cli": "11.0.1",
63-
"react": "catalog:",
64-
"tailwindcss": "catalog:",
65-
"typescript": "catalog:"
50+
"react": "catalog:"
6651
},
6752
"devDependencies": {
6853
"@eslint-react/eslint-plugin": "~5.8.6",
@@ -71,23 +56,29 @@
7156
"@storybook/addon-themes": "~10.4.1",
7257
"@storybook/addon-webpack5-compiler-swc": "~4.0.3",
7358
"@storybook/react-webpack5": "~10.4.1",
59+
"@tailwindcss/postcss": "~4.3.0",
7460
"@testing-library/user-event": "~14.6.1",
7561
"@types/node": "catalog:",
62+
"@types/react": "catalog:",
7663
"concurrently": "9.2.1",
7764
"cross-env": "catalog:",
7865
"css-loader": "7.1.4",
7966
"eslint-plugin-react": "7.37.5",
8067
"eslint-plugin-react-hooks": "7.1.1",
8168
"eslint-plugin-storybook": "10.3.3",
8269
"global-jsdom": "29.0.0",
70+
"postcss-calc": "~10.1.1",
71+
"postcss-cli": "^11.0.1",
8372
"postcss-loader": "8.2.1",
8473
"storybook": "~10.4.1",
8574
"style-loader": "4.0.0",
8675
"stylelint": "17.9.1",
8776
"stylelint-config-standard": "40.0.0",
8877
"stylelint-order": "8.1.1",
8978
"stylelint-selector-bem-pattern": "4.0.1",
90-
"tsx": "4.22.3"
79+
"tailwindcss": "catalog:",
80+
"tsx": "4.22.3",
81+
"typescript": "catalog:"
9182
},
9283
"imports": {
9384
"#ui/*": {

pnpm-lock.yaml

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@
88
"//#prettier:fix": {
99
"outputs": [".prettiercache"]
1010
},
11-
"compile": {
12-
"dependsOn": ["^topo"]
13-
},
1411
"build": {
1512
"dependsOn": ["^topo"]
1613
},

0 commit comments

Comments
 (0)