Skip to content
Open
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
5 changes: 3 additions & 2 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,11 @@ jobs:
# Check if a custom publish script exists in package.json
if jq -e '.scripts.release' package.json > /dev/null; then
pnpm run release
else
pnpm publish --access public --no-git-checks
fi
# Then publish the package to npm
pnpm publish --access public --no-git-checks
- name: Notify on Manual Release
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3
Expand Down
1 change: 1 addition & 0 deletions apps/site/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "Bundler",
"customConditions": ["default"],
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "Bundler",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"incremental": true,
Expand Down
20 changes: 20 additions & 0 deletions packages/ui-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,23 @@ The components are based on [this design file](https://www.figma.com/design/a10c
Most components in this package are available on [Chromatic](https://www.chromatic.com/library?appId=64c7d71358830e9105808652).

For additional details regarding specific components, refer to the [nodejs/nodejs.org](https://github.com/nodejs/nodejs.org) repository.

## Local development

To use this package via `npm link` in another repo (for example, doc-kit), build the
compiled outputs and keep them updated while you work.

```bash
# From nodejs.org/packages/ui-components
pnpm install
node --run compile:watch

# In another terminal, still in nodejs.org/packages/ui-components
npm link

# From the consumer repo (for example doc-kit)
npm link @node-core/ui-components
```

The `compile:watch` script keeps `dist/` up to date so consumers resolve compiled
CSS and JavaScript instead of the raw Tailwind source.
50 changes: 35 additions & 15 deletions packages/ui-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,20 @@
"version": "1.5.10",
"type": "module",
"exports": {
"./*": [
"./src/*",
"./src/*.tsx",
"./src/*/index.tsx",
"./src/*.ts",
"./src/*/index.ts"
]
"./*": {
"rolldown": [
"./dist/*",
"./dist/*.js",
"./dist/*/index.js"
],
"default": [
"./src/*",
"./src/*.tsx",
"./src/*/index.tsx",
"./src/*.ts",
"./src/*/index.ts"
]
}
},
"repository": {
"type": "git",
Expand All @@ -20,7 +27,8 @@
"compile:ts": "tsc",
"compile:css": "postcss --dir dist --base src \"src/**/*.module.css\" src/styles/index.css",
"compile": "node --run compile:ts && node --run compile:css",
"release": "node --run compile && node scripts/publish.mjs",
"compile:watch": "concurrently -k \"node --run compile:ts -- --watch\" \"node --run compile:css -- --watch\"",
"release": "node --run compile",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, we can just remove release and tell GitHub Actions to run compile

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, Im, fine with this :)

"lint": "node --run lint:js && node --run lint:css",
"lint:css": "stylelint \"**/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache",
"lint:css:fix": "node --run lint:css -- --fix",
Expand Down Expand Up @@ -61,6 +69,7 @@
"@types/node": "catalog:",
"@types/react": "catalog:",
"cross-env": "catalog:",
"concurrently": "^8.2.2",
"css-loader": "~7.1.2",
"eslint-plugin-react": "~7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
Expand All @@ -80,14 +89,25 @@
"typescript": "catalog:"
},
"imports": {
"#ui/*": [
"./src/*",
"./src/*.tsx",
"./src/*/index.tsx",
"./src/*.ts",
"./src/*/index.ts"
]
"#ui/*": {
"rolldown": [
"./dist/*",
"./dist/*.js",
"./dist/*/index.js"
],
"default": [
"./src/*",
"./src/*.tsx",
"./src/*/index.tsx",
"./src/*.ts",
"./src/*/index.ts"
]
}
},
"files": [
"dist/**",
"README.md"
],
"engines": {
"node": ">=20"
}
Expand Down
32 changes: 0 additions & 32 deletions packages/ui-components/scripts/publish.mjs

This file was deleted.

4 changes: 3 additions & 1 deletion packages/ui-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
"forceConsistentCasingInFileNames": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "Bundler",
"moduleResolution": "bundler",
"customConditions": ["default"],
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"declaration": true,
"incremental": true,
"baseUrl": "./src",
"rootDir": "./src",
Expand Down
Loading
Loading