Skip to content

Commit 34c1ca1

Browse files
authored
typedoc integration (#284)
* typedoc integration * fix doc build
1 parent db6ef7f commit 34c1ca1

16 files changed

+902
-205
lines changed

.github/workflows/docs.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
run: |
3434
git config --global user.email "[email protected]"
3535
git config --global user.name "gh-actions"
36+
npm install --ignore-scripts
37+
npm run docs
3638
cd website
3739
if [ -e yarn.lock ]; then
3840
yarn install --frozen-lockfile
@@ -41,4 +43,4 @@ jobs:
4143
else
4244
npm i
4345
fi
44-
yarn docs
46+
yarn deploy

src/demo.tsx

+1-60
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,9 @@
11
import React from "react";
2-
import { QIcon, QApplication, QKeySequence } from "@nodegui/nodegui";
3-
import path from "path";
4-
import {
5-
Action,
6-
Text,
7-
MenuBar,
8-
Menu,
9-
SystemTrayIcon,
10-
Renderer,
11-
Window,
12-
} from ".";
13-
14-
const quitAction = (
15-
<Action
16-
on={{
17-
triggered: () => {
18-
QApplication.instance().exit(0);
19-
},
20-
}}
21-
shortcut={new QKeySequence("Ctrl+Q")}
22-
text="Quit"
23-
/>
24-
);
25-
const sayHiAction = (
26-
<Action
27-
on={{
28-
triggered: () => {
29-
console.log("hello");
30-
},
31-
}}
32-
text="Hello"
33-
/>
34-
);
35-
36-
const trayIcon = new QIcon(
37-
path.join(__dirname, "../extras/assets/nodegui.png")
38-
);
2+
import { Text, Renderer, Window } from ".";
393

404
const App = () => {
415
return (
426
<Window>
43-
<SystemTrayIcon icon={trayIcon} tooltip="React Nodegui" visible>
44-
<Menu>
45-
<Action
46-
on={{
47-
triggered: () => {
48-
console.log("print");
49-
},
50-
}}
51-
text="Print"
52-
shortcut={new QKeySequence("Ctrl+P")}
53-
/>
54-
<Action separator />
55-
{quitAction}
56-
</Menu>
57-
</SystemTrayIcon>
58-
<MenuBar>
59-
<Menu title="Random">
60-
{sayHiAction}
61-
<Action separator />
62-
{sayHiAction}
63-
{quitAction}
64-
</Menu>
65-
</MenuBar>
667
<Text>Hello</Text>
678
</Window>
689
);

0 commit comments

Comments
 (0)