Skip to content

Commit c9cda99

Browse files
committed
chore(deps): update dependency tsbb to v4 #43
jaywcjlove/tsbb#439
1 parent 6085e47 commit c9cda99

File tree

4 files changed

+49
-37
lines changed

4 files changed

+49
-37
lines changed

package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"private": true,
33
"scripts": {
44
"⬇️⬇️⬇️⬇️⬇️ package ⬇️⬇️⬇️⬇️⬇️": "▼▼▼▼▼ package ▼▼▼▼▼",
5-
"build": "lerna exec --scope @uiw/* -- tsbb build && npm run css:build && npm run css:build:dist",
6-
"watch": "lerna exec \"tsbb watch\" --scope @uiw/* & npm run css:watch",
5+
"build": "lerna exec --scope @uiw/* -- tsbb build src/*.tsx --use-babel && npm run css:build && npm run css:build:dist",
6+
"watch": "lerna exec \"tsbb watch src/*.tsx --use-babel\" --scope @uiw/* & npm run css:watch",
77
"css:build": "lerna exec --scope @uiw/* -- compile-less -d src -o esm",
88
"css:watch": "lerna exec --scope @uiw/* -- compile-less -d src -o esm --watch",
99
"css:build:dist": "lerna exec --scope @uiw/* -- compile-less -d src -o lib --combine=dist.css",
@@ -47,16 +47,19 @@
4747
"node": ">=16.0.0"
4848
},
4949
"devDependencies": {
50-
"@testing-library/react": "^13.3.0",
51-
"@kkt/ncc": "^1.0.14",
50+
"@testing-library/react": "^14.0.0",
51+
"@kkt/ncc": "^1.0.15",
5252
"compile-less-cli": "^1.8.13",
5353
"husky": "^8.0.1",
54-
"lerna": "^5.4.3",
55-
"lint-staged": "^13.0.3",
56-
"prettier": "^2.7.1",
54+
"lerna": "^6.6.1",
55+
"lint-staged": "^13.2.1",
56+
"prettier": "^2.8.7",
5757
"pretty-quick": "^3.1.3",
5858
"react": "~18.2.0",
5959
"react-dom": "~18.2.0",
60-
"tsbb": "^3.7.7"
60+
"tsbb": "^4.1.5",
61+
"jest-watch-typeahead": "^2.2.2",
62+
"jest-environment-jsdom": "~29.5.0",
63+
"jest-environment-node": "^29.5.0"
6164
}
6265
}

website/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@
1515
"@uiw/react-markdown-preview": "^4.0.16",
1616
"@wcj/dark-mode": "^1.0.14",
1717
"react": "~18.2.0",
18-
"react-code-preview-layout": "^2.0.3",
18+
"react-code-preview-layout": "^3.0.0",
1919
"react-dom": "~18.2.0",
2020
"rehype-ignore": "^1.0.1"
2121
},
2222
"devDependencies": {
23-
"@kkt/less-modules": "^7.2.0",
24-
"@kkt/raw-modules": "^7.2.0",
25-
"@kkt/scope-plugin-options": "^7.2.0",
23+
"@kkt/less-modules": "^7.4.9",
24+
"@kkt/raw-modules": "^7.4.9",
25+
"@kkt/scope-plugin-options": "^7.4.9",
2626
"@types/react": "^18.0.17",
2727
"@types/react-dom": "^18.0.6",
28-
"kkt": "^7.2.0",
28+
"kkt": "^7.4.9",
2929
"markdown-react-code-preview-loader": "^2.1.2"
3030
},
3131
"eslintConfig": {

website/src/App.tsx

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@ import pkg from '@uiw/react-layout/package.json';
77
// import Codepen from '@uiw/react-codepen';
88
import CodeSandbox from '@uiw/react-codesandbox';
99
import rehypeIgnore from 'rehype-ignore';
10+
import { Fragment } from 'react';
1011
import '@wcj/dark-mode';
1112
import styles from './App.module.less';
1213
import logo from './logo.svg';
1314
import Footer from './Footer';
14-
import { Fragment } from 'react';
15+
16+
const Preview = CodeLayout.Preview;
17+
const Code = CodeLayout.Code;
18+
const Toolbar = CodeLayout.Toolbar;
1519

1620
// @ts-ignore
1721
const version = VERSION;
@@ -100,27 +104,30 @@ export default function App() {
100104
},
101105
},
102106
};
103-
107+
const extra = (
108+
<Fragment>
109+
{/* <Codepen {...codePenOption}>
110+
<svg viewBox="0 0 1024 1024" width="18" height="18" fill="currentColor">
111+
<path
112+
d="M123.428571 668l344.571429 229.714286v-205.142857L277.142857 565.142857z m-35.428571-82.285714l110.285714-73.714286-110.285714-73.714286v147.428572z m468 312l344.571429-229.714286-153.714286-102.857143-190.857143 127.428572v205.142857z m-44-281.714286l155.428571-104-155.428571-104-155.428571 104zM277.142857 458.857143l190.857143-127.428572V126.285714L123.428571 356z m548.571429 53.142857l110.285714 73.714286V438.285714z m-78.857143-53.142857l153.714286-102.857143-344.571429-229.714286v205.142857z m277.142857-102.857143v312q0 23.428571-19.428571 36.571429l-468 312q-12 7.428571-24.571429 7.428571t-24.571429-7.428571L19.428571 704.571429q-19.428571-13.142857-19.428571-36.571429V356q0-23.428571 19.428571-36.571429L487.428571 7.428571q12-7.428571 24.571429-7.428571t24.571429 7.428571l468 312q19.428571 13.142857 19.428571 36.571429z"
113+
p-id="2071"
114+
/>
115+
</svg>
116+
</Codepen> */}
117+
<CodeSandbox {...codeSandboxOption}>Open in CodeSandbox</CodeSandbox>
118+
</Fragment>
119+
);
104120
return (
105-
<CodeLayout
106-
toolbar={param.title || 'Example'}
107-
code={<code {...rest} />}
108-
text={code}
109-
toolbarExtra={
110-
<Fragment>
111-
{/* <Codepen {...codePenOption}>
112-
<svg viewBox="0 0 1024 1024" width="18" height="18" fill="currentColor">
113-
<path
114-
d="M123.428571 668l344.571429 229.714286v-205.142857L277.142857 565.142857z m-35.428571-82.285714l110.285714-73.714286-110.285714-73.714286v147.428572z m468 312l344.571429-229.714286-153.714286-102.857143-190.857143 127.428572v205.142857z m-44-281.714286l155.428571-104-155.428571-104-155.428571 104zM277.142857 458.857143l190.857143-127.428572V126.285714L123.428571 356z m548.571429 53.142857l110.285714 73.714286V438.285714z m-78.857143-53.142857l153.714286-102.857143-344.571429-229.714286v205.142857z m277.142857-102.857143v312q0 23.428571-19.428571 36.571429l-468 312q-12 7.428571-24.571429 7.428571t-24.571429-7.428571L19.428571 704.571429q-19.428571-13.142857-19.428571-36.571429V356q0-23.428571 19.428571-36.571429L487.428571 7.428571q12-7.428571 24.571429-7.428571t24.571429 7.428571l468 312q19.428571 13.142857 19.428571 36.571429z"
115-
p-id="2071"
116-
/>
117-
</svg>
118-
</Codepen> */}
119-
<CodeSandbox {...codeSandboxOption}>Open in CodeSandbox</CodeSandbox>
120-
</Fragment>
121-
}
122-
>
123-
<Child />
121+
<CodeLayout disableCheckered style={{ marginBottom: 18 }}>
122+
<Preview>
123+
<Child />
124+
</Preview>
125+
<Toolbar extra={extra} text={code}>
126+
{param.title || 'Example'}
127+
</Toolbar>
128+
<Code>
129+
<pre {...rest} />
130+
</Code>
124131
</CodeLayout>
125132
);
126133
}

website/src/index.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import React from 'react';
2-
import ReactDOM from 'react-dom';
32
import App from './App';
43
import './index.css';
54

6-
ReactDOM.render(
5+
import * as ReactDOMClient from 'react-dom/client';
6+
7+
const container = document.getElementById('root');
8+
const root = ReactDOMClient.createRoot(container!);
9+
root.render(
710
<React.StrictMode>
811
<App />
912
</React.StrictMode>,
10-
document.getElementById('root'),
1113
);

0 commit comments

Comments
 (0)