Skip to content

Commit

Permalink
feat: update init file templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ncpa0cpl committed Dec 17, 2024
1 parent a0f5263 commit 9046acb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
13 changes: 8 additions & 5 deletions src/init-project/entry-file-js.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
Renderer,
Span,
Window,
} from "@reactgjs/renderer";
import "@reactgjs/react-gtk";
} from "@reactgjs/react-gtk";
import env from "gapp:env";
new Renderer({ appId: env.appId }).start(
function App() {
return (
<Window
minWidth={800}
minHeight={600}
Expand All @@ -20,6 +20,9 @@ new Renderer({ appId: env.appId }).start(
<Markup>
<Span fontSize={32}>Sample React GTK App</Span>
</Markup>
</Window>,
);
</Window>
);
}
new Renderer({ appId: env.appId }).start(<App />);
`.trim() + "\n";
14 changes: 8 additions & 6 deletions src/init-project/entry-file-ts.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
export const getTsEntryFile = () =>
/* ts */ `
/// <reference types="gjs-esm-types" />
import React from "react";
import {
Markup,
Renderer,
Span,
Window,
} from "@reactgjs/renderer";
import "@reactgjs/react-gtk";
} from "@reactgjs/react-gtk";
import env from "gapp:env";
new Renderer({ appId: env.appId }).start(
function App() {
return (
<Window
minWidth={800}
minHeight={600}
Expand All @@ -21,6 +20,9 @@ new Renderer({ appId: env.appId }).start(
<Markup>
<Span fontSize={32}>Sample React GTK App</Span>
</Markup>
</Window>,
);
</Window>
);
}
new Renderer({ appId: env.appId }).start(<App />);
`.trim() + "\n";

0 comments on commit 9046acb

Please sign in to comment.