mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Feature/default templates (#1334)
This commit is contained in:
@@ -7,8 +7,9 @@ sidebar_position: 5
|
||||
You can run your application in development mode by running `wails dev` from your project directory. This will do the following things:
|
||||
|
||||
- Build your application and run it
|
||||
- Watch for modifications in your Go files and rebuild/re-run on change
|
||||
- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console.
|
||||
- Bind your Go code to the frontend so it can be called from Javascript
|
||||
- Using the power of [vite](https://vitejs.dev/), will watch for modifications in your Go files and rebuild/re-run on change
|
||||
- Sets up a [webserver](http://localhost:34115) that will serve your application over a browser. This allows you to use your favourite browser extensions. You can even call your Go code from the console
|
||||
|
||||
To get started, run `wails dev` in the project directory. More information on this can be found [here](../reference/cli.mdx#dev).
|
||||
|
||||
|
||||
@@ -8,10 +8,81 @@ sidebar_position: 2
|
||||
|
||||
Now that the CLI is installed, you can generate a new project by using the `wails init` command.
|
||||
|
||||
To get up and running quickly, you can generate a default project by running `wails init -n myproject`. This will
|
||||
create a directory called `myproject` and populate it with the default template.
|
||||
Pick your favourite framework:
|
||||
|
||||
|
||||
import Tabs from "@theme/Tabs";
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
||||
<Tabs
|
||||
defaultValue="Svelte"
|
||||
values={[
|
||||
{ label: "Svelte", value: "Svelte" },
|
||||
{ label: "React", value: "React" },
|
||||
{ label: "Vue", value: "Vue" },
|
||||
{ label: "Preact", value: "Preact" },
|
||||
{ label: "Lit", value: "Lit" },
|
||||
{ label: "Vanilla", value: "Vanilla" },
|
||||
]}
|
||||
>
|
||||
<TabItem value="Svelte">
|
||||
Generate a <a href="https://svelte.dev/">Svelte</a> project using Javascript with:<br/>
|
||||
|
||||
wails init -n myproject -t svelte
|
||||
|
||||
If you would rather use Typescript:
|
||||
|
||||
wails init -n myproject -t svelte-ts
|
||||
</TabItem>
|
||||
<TabItem value="React">
|
||||
Generate a <a href="https://reactjs.org/">React</a> project using Javascript with:<br/>
|
||||
|
||||
wails init -n myproject -t react
|
||||
|
||||
If you would rather use Typescript:
|
||||
|
||||
wails init -n myproject -t react-ts
|
||||
</TabItem>
|
||||
<TabItem value="Vue">
|
||||
Generate a <a href="https://vuejs.org/">Vue</a> project using Javascript with:<br/>
|
||||
|
||||
wails init -n myproject -t vue
|
||||
|
||||
If you would rather use Typescript:
|
||||
|
||||
wails init -n myproject -t vue-ts
|
||||
</TabItem>
|
||||
<TabItem value="Preact">
|
||||
Generate a <a href="https://preactjs.com/">Preact</a> project using Javascript with:<br/>
|
||||
|
||||
wails init -n myproject -t preact
|
||||
|
||||
If you would rather use Typescript:
|
||||
|
||||
wails init -n myproject -t preact-ts
|
||||
</TabItem>
|
||||
<TabItem value="Lit">
|
||||
Generate a <a href="https://lit.dev/">Lit</a> project using Javascript with:<br/>
|
||||
|
||||
wails init -n myproject -t lit
|
||||
|
||||
If you would rather use Typescript:
|
||||
|
||||
wails init -n myproject -t lit-ts
|
||||
</TabItem>
|
||||
<TabItem value="Vanilla">
|
||||
Generate a Vanilla project using Javascript with:<br/>
|
||||
|
||||
wails init -n myproject -t vanilla
|
||||
|
||||
If you would rather use Typescript:
|
||||
|
||||
wails init -n myproject -t vanilla-ts
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
<hr/>
|
||||
|
||||
Other project templates are available and can be listed using `wails init -l`.
|
||||
There are also [community templates](../community/templates.mdx) available that offer different capabilities and frameworks.
|
||||
|
||||
To see the other options available, you can run `wails init -help`.
|
||||
|
||||
@@ -21,6 +21,12 @@ gives it that 'frosty' effect of a native app.
|
||||
</a>
|
||||
</p>
|
||||
|
||||
## Quick Start Templates
|
||||
|
||||
Wails comes with a number of pre-configured templates that allow you to get your application up and running quickly.
|
||||
There are templates for the following frameworks: Svelte, React, Vue, Preact, Lit and Vanilla. There are both Javascript
|
||||
and Typescript versions for each template.
|
||||
|
||||
## Native Elements
|
||||
|
||||
Wails uses a purpose built library for handling native elements such as Window, Menus, Dialogs, etc, so you can build
|
||||
|
||||
Reference in New Issue
Block a user