File tree Expand file tree Collapse file tree 8 files changed +128
-61
lines changed
Expand file tree Collapse file tree 8 files changed +128
-61
lines changed Original file line number Diff line number Diff line change @@ -116,10 +116,11 @@ jobs:
116116 # Check if a custom publish script exists in package.json
117117 if jq -e '.scripts.release' package.json > /dev/null; then
118118 pnpm run release
119- else
120- pnpm publish --access public --no-git-checks
121119 fi
122120
121+ # Then publish the package to npm
122+ pnpm publish --access public --no-git-checks
123+
123124 - name : Notify on Manual Release
124125 if : ${{ github.event_name == 'workflow_dispatch' }}
125126 uses : rtCamp/action-slack-notify@e31e87e03dd19038e411e38ae27cbad084a90661 # 2.3.3
Original file line number Diff line number Diff line change 1010 "esModuleInterop" : true ,
1111 "module" : " esnext" ,
1212 "moduleResolution" : " Bundler" ,
13+ "customConditions" : [" default" ],
1314 "resolveJsonModule" : true ,
1415 "isolatedModules" : true ,
1516 "jsx" : " react-jsx" ,
Original file line number Diff line number Diff line change 88 "forceConsistentCasingInFileNames" : true ,
99 "esModuleInterop" : true ,
1010 "module" : " esnext" ,
11- "moduleResolution" : " Bundler " ,
11+ "moduleResolution" : " bundler " ,
1212 "resolveJsonModule" : true ,
1313 "isolatedModules" : true ,
1414 "incremental" : true ,
Original file line number Diff line number Diff line change @@ -8,3 +8,23 @@ The components are based on [this design file](https://www.figma.com/design/a10c
88Most components in this package are available on [ Chromatic] ( https://www.chromatic.com/library?appId=64c7d71358830e9105808652 ) .
99
1010For additional details regarding specific components, refer to the [ nodejs/nodejs.org] ( https://github.com/nodejs/nodejs.org ) repository.
11+
12+ ## Local development
13+
14+ To use this package via ` npm link ` in another repo (for example, doc-kit), build the
15+ compiled outputs and keep them updated while you work.
16+
17+ ``` bash
18+ # From nodejs.org/packages/ui-components
19+ pnpm install
20+ node --run compile:watch
21+
22+ # In another terminal, still in nodejs.org/packages/ui-components
23+ npm link
24+
25+ # From the consumer repo (for example doc-kit)
26+ npm link @node-core/ui-components
27+ ```
28+
29+ The ` compile:watch ` script keeps ` dist/ ` up to date so consumers resolve compiled
30+ CSS and JavaScript instead of the raw Tailwind source.
Original file line number Diff line number Diff line change 33 "version" : " 1.5.10" ,
44 "type" : " module" ,
55 "exports" : {
6- "./*" : [
7- " ./src/*" ,
8- " ./src/*.tsx" ,
9- " ./src/*/index.tsx" ,
10- " ./src/*.ts" ,
11- " ./src/*/index.ts"
12- ]
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+ }
1320 },
1421 "repository" : {
1522 "type" : " git" ,
2027 "compile:ts" : " tsc" ,
2128 "compile:css" : " postcss --dir dist --base src \" src/**/*.module.css\" src/styles/index.css" ,
2229 "compile" : " node --run compile:ts && node --run compile:css" ,
23- "release" : " node --run compile && node scripts/publish.mjs" ,
30+ "compile:watch" : " concurrently -k \" node --run compile:ts -- --watch\" \" node --run compile:css -- --watch\" " ,
31+ "release" : " node --run compile" ,
2432 "lint" : " node --run lint:js && node --run lint:css" ,
2533 "lint:css" : " stylelint \" **/*.css\" --allow-empty-input --cache --cache-strategy=content --cache-location=.stylelintcache" ,
2634 "lint:css:fix" : " node --run lint:css -- --fix" ,
6169 "@types/node" : " catalog:" ,
6270 "@types/react" : " catalog:" ,
6371 "cross-env" : " catalog:" ,
72+ "concurrently" : " ^8.2.2" ,
6473 "css-loader" : " ~7.1.2" ,
6574 "eslint-plugin-react" : " ~7.37.5" ,
6675 "eslint-plugin-react-hooks" : " ^7.0.1" ,
8089 "typescript" : " catalog:"
8190 },
8291 "imports" : {
83- "#ui/*" : [
84- " ./src/*" ,
85- " ./src/*.tsx" ,
86- " ./src/*/index.tsx" ,
87- " ./src/*.ts" ,
88- " ./src/*/index.ts"
89- ]
92+ "#ui/*" : {
93+ "rolldown" : [
94+ " ./dist/*" ,
95+ " ./dist/*.js" ,
96+ " ./dist/*/index.js"
97+ ],
98+ "default" : [
99+ " ./src/*" ,
100+ " ./src/*.tsx" ,
101+ " ./src/*/index.tsx" ,
102+ " ./src/*.ts" ,
103+ " ./src/*/index.ts"
104+ ]
105+ }
90106 },
107+ "files" : [
108+ " dist/**" ,
109+ " README.md"
110+ ],
91111 "engines" : {
92112 "node" : " >=20"
93113 }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 88 "forceConsistentCasingInFileNames" : true ,
99 "esModuleInterop" : true ,
1010 "module" : " esnext" ,
11- "moduleResolution" : " Bundler" ,
11+ "moduleResolution" : " bundler" ,
12+ "customConditions" : [" default" ],
1213 "resolveJsonModule" : true ,
1314 "isolatedModules" : true ,
1415 "jsx" : " react-jsx" ,
16+ "declaration" : true ,
1517 "incremental" : true ,
1618 "baseUrl" : " ./src" ,
1719 "rootDir" : " ./src" ,
You can’t perform that action at this time.
0 commit comments