summaryrefslogtreecommitdiff
path: root/docs/guide/typescript/first-widgets.md
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-11-12 01:22:51 +0000
committerAylur <[email protected]>2024-11-12 01:23:13 +0000
commit17aeb9ef945848befdbce0be76ffbeffe27c24d6 (patch)
treed9ef10f45e95339d6479d975edec1104acae0191 /docs/guide/typescript/first-widgets.md
parent2a9bb96f056f25c95b330984cfe7ac484db6c9c6 (diff)
docs: remove ags related docs
ags documentation will live on its own site
Diffstat (limited to 'docs/guide/typescript/first-widgets.md')
-rw-r--r--docs/guide/typescript/first-widgets.md41
1 files changed, 13 insertions, 28 deletions
diff --git a/docs/guide/typescript/first-widgets.md b/docs/guide/typescript/first-widgets.md
index 96a1275..a467382 100644
--- a/docs/guide/typescript/first-widgets.md
+++ b/docs/guide/typescript/first-widgets.md
@@ -2,41 +2,26 @@
## Getting Started
-Start by initializing a project
+Start by importing the singleton
+[Astal.Application](https://aylur.github.io/libastal/astal3/class.Application.html) instance.
-```sh
-ags init
-```
+:::code-group
-then run `ags run` in the terminal
+```ts [app.ts]
+import { App } from "astal/gtk3"
-```sh
-ags run
+App.start({
+ main() {
+ // you will instantiate Widgets here
+ // and setup anything else if you need
+ }
+})
```
-:::details Usage without AGS
-🚧 Not yet documented. 🚧
-:::
-
-That's it! You have now a custom written bar using Gtk.
-
-:::tip
-AGS will transpile every `.ts`, `.jsx` and `.tsx` files into regular JavaScript, then
-it will bundle everything into a single JavaScript file which then GJS can execute.
:::
-The AGS init command will generate the following files
-
-```txt
-.
-├── @girs/ # generated types
-├── widget/
-│ └── Bar.tsx
-├── app.ts # entry proint
-├── env.d.ts # additional types
-├── style.css
-└── tsconfig.json # needed by LSPs
-```
+After your [bundle step](./installation.md) run `gjs -m app.js`, and that's it!
+Now you have an Astal instance running written in TypeScript.
## Root of every shell component: Window