File tree Expand file tree Collapse file tree 8 files changed +844
-588
lines changed Expand file tree Collapse file tree 8 files changed +844
-588
lines changed Original file line number Diff line number Diff line change 66jobs :
77 Build-and-Publish :
88 runs-on : ubuntu-latest
9+ permissions :
10+ contents : write
11+ id-token : write
912 steps :
10- - uses : actions/checkout@v3
13+ - uses : actions/checkout@v4
1114
12- - uses : pnpm/action-setup@v2
15+ - uses : pnpm/action-setup@v4
1316 with :
1417 version : 9
15- - uses : actions/setup-node@v3
18+
19+ - uses : actions/setup-node@v4
1620 with :
17- node-version : 18
21+ node-version : 20
1822 registry-url : https://registry.npmjs.org
1923 cache : pnpm
24+
2025 - name : Install Dependencies
2126 run : pnpm i --frozen-lockfile
2227
2328 - name : Build & Publish
24- run : npm publish
29+ run : npm publish --access public --provenance
2530 env :
2631 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
2732
2833 - name : Update document
29- uses : peaceiris/actions-gh-pages@v3
34+ uses : peaceiris/actions-gh-pages@v4
3035 with :
3136 publish_dir : ./docs
3237 personal_token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -68,17 +68,29 @@ console.log(newVNode);
6868
6969### Node.js & Bun
7070
71- ``` jsx
72- import { Readable } from ' stream ' ;
73- import { createServer } from ' http ' ;
71+ #### ` view.tsx `
72+
73+ ``` tsx
7474import { DOMRenderer } from ' dom-renderer' ;
7575
7676const renderer = new DOMRenderer ();
7777
7878const Hello = () => <h1 >Hello, JSX SSR!</h1 >;
7979
80+ export const generateStream = () => renderer .renderToReadableStream (<Hello />);
81+ ```
82+
83+ #### ` index.ts `
84+
85+ ``` js
86+ import { Readable } from ' stream' ;
87+ import { createServer } from ' http' ;
88+ import ' dom-renderer/polyfill' ;
89+
90+ import { generateStream } from ' ./view' ;
91+
8092createServer ((request , response ) => {
81- const stream = renderer . renderToReadableStream ( < Hello / > );
93+ const stream = generateStream ( );
8294
8395 Readable .fromWeb (stream).pipe (response);
8496}).listen (8080 );
Original file line number Diff line number Diff line change 11{
22 "name" : " dom-renderer" ,
3- "version" : " 2.3.0 " ,
3+ "version" : " 2.3.1 " ,
44 "license" : " LGPL-3.0-or-later" ,
5566 "description" : " A light-weight DOM Renderer supports Web components standard & TypeScript language" ,
2525 "main" : " dist/index.js" ,
2626 "dependencies" : {
2727 "declarative-shadow-dom-polyfill" : " ^0.4.0" ,
28- "tslib" : " ^2.6.3 " ,
28+ "tslib" : " ^2.8.0 " ,
2929 "web-streams-polyfill" : " ^4.0.0" ,
30- "web-utility" : " ^4.4.0"
30+ "web-utility" : " ^4.4.1"
31+ },
32+ "peerDependencies" : {
33+ "happy-dom" : " ^14"
3134 },
3235 "devDependencies" : {
3336 "@happy-dom/jest-environment" : " ^14.12.3" ,
34- "@types/jest" : " ^29.5.12" ,
35- "@types/node" : " ^18.19.42" ,
36- "husky" : " ^9.1.2" ,
37+ "@types/jest" : " ^29.5.14" ,
38+ "@types/node" : " ^20.17.1" ,
39+ "happy-dom" : " ^14.12.3" ,
40+ "husky" : " ^9.1.6" ,
3741 "jest" : " ^29.7.0" ,
38- "lint-staged" : " ^15.2.7 " ,
42+ "lint-staged" : " ^15.2.10 " ,
3943 "open-cli" : " ^8.0.0" ,
4044 "prettier" : " ^3.3.3" ,
41- "ts-jest" : " ^29.2.3 " ,
42- "typedoc" : " ^0.26.5 " ,
43- "typedoc-plugin-mdn-links" : " ^3.2.5 " ,
44- "typescript" : " ~5.5.4 "
45+ "ts-jest" : " ^29.2.5 " ,
46+ "typedoc" : " ^0.26.10 " ,
47+ "typedoc-plugin-mdn-links" : " ^3.3.4 " ,
48+ "typescript" : " ~5.6.3 "
4549 },
4650 "prettier" : {
4751 "singleQuote" : true ,
You can’t perform that action at this time.
0 commit comments