Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix: 修复 md playground 设置宽度不生效 & 版本锁定解决playground无法运作
Browse files Browse the repository at this point in the history
修复 warning
  • Loading branch information
xinming committed Mar 30, 2021
1 parent bb0cd09 commit 2350433
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 20 deletions.
6 changes: 5 additions & 1 deletion @antv/gatsby-theme-antv/site/components/MdPlayground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,11 @@ const PlayGround: React.FC<PlayGroundProps> = ({
);

const { extraLib = '' } = site.siteMetadata.playground;
const splitPaneSize = get(site.siteMetadata, ['splitPaneMainSize'], '62%');
const splitPaneSize = get(
site.siteMetadata,
['mdPlayground', 'splitPaneMainSize'],
'62%',
);
const { t, i18n } = useTranslation();
const playgroundNode = useRef<HTMLDivElement>(null);
const [error, setError] = useState<Error | null>();
Expand Down
42 changes: 27 additions & 15 deletions example/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
{
"mainEntryPointFilePath": "<projectFolder>/example/src/index.d.ts",
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": true
},
"tsdocMetadata": {
"enabled": false
}
}
{
"mainEntryPointFilePath": "<projectFolder>/example/src/index.d.ts",
"apiReport": {
"enabled": false
},
"docModel": {
"enabled": false
},
"dtsRollup": {
"enabled": true
},
"tsdocMetadata": {
"enabled": false
},
"messages": {
"extractorMessageReporting": {
"ae-missing-release-tag": {
"logLevel": "none"
}
},
"tsdocMessageReporting": {
"tsdoc-param-tag-missing-hyphen": {
"logLevel": "none"
}
}
}
}
10 changes: 10 additions & 0 deletions example/docs/api/g2plot/scatter.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Scatter
order: 1
---

### 图表容器

`markdown:docs/common/chart-options.en.md`

<playground path='basic/demo/ts-demo.ts' rid='rect'></playground>
10 changes: 10 additions & 0 deletions example/docs/api/g2plot/scatter.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: 散点图
order: 1
---

### 图表容器

`markdown:docs/common/chart-options.zh.md`

<playground path='basic/demo/ts-demo.ts' rid='rect'></playground>
12 changes: 8 additions & 4 deletions example/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,16 @@ module.exports = {
{
slug: 'api/antv',
title: {
zh: '测试 g2',
en: 'test g2',
zh: '测试 G2',
en: 'test G2',
},
order: 0,
},
{
slug: 'api/g2plot',
title: {
zh: 'g2plot',
en: 'g2plot',
zh: 'G2Plot',
en: 'G2Plot',
},
order: 1,
},
Expand Down Expand Up @@ -121,6 +121,10 @@ module.exports = {
</body>
</html>`,
},
mdPlayground: {
// markdown 文档中的 playground 若干设置
splitPaneMainSize: '50%',
},
redirects: [],
},
};
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,10 @@
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"resolutions": {
"monaco-editor": "0.21.3",
"@babel/plugin-transform-spread": "7.12.1",
"@babel/standalone": "7.12.6"
}
}

0 comments on commit 2350433

Please sign in to comment.