Skip to content

Commit 7ef2a34

Browse files
committed
Merge branch 'release'
2 parents a13e4ad + 6225812 commit 7ef2a34

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

web/docs/general/wasp-ts-config.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Wasp TS config is an **early preview** feature, meaning it is a little rough and
7878
}
7979
```
8080

81-
5. Add `"type": "module"` to the top level of your `package.json`:
81+
5. Add `"type": "module"` to the top level of your `package.json`, if you don't have it yet:
8282

8383
```json title="package.json"
8484
{
@@ -93,19 +93,23 @@ Wasp TS config is an **early preview** feature, meaning it is a little rough and
9393
9. Create an empty `main.wasp.ts` file and rewrite your `main.wasp.old` in it but in TypeScript.
9494

9595
Check out the [reference main.wasp.ts file](#reference-main-wasp-ts-file) below for details on what the TypeScript API for configuring Wasp looks like.
96-
In short, you'll have to:
97-
1. Import `App` from `wasp-config`
98-
2. Create a new `app` object with `new App()`.
99-
3. Use the `app` object to define parts of your web app like `auth`, `pages`, `query`, `api`...
100-
4. Export the `app` from your file using a default export.
96+
In short, you'll have to:
97+
1. Import `App` from `wasp-config`
98+
2. Create a new `app` object with `new App()`.
99+
3. Use the `app` object to define parts of your web app like `auth`, `pages`, `query`, `api`...
100+
4. Export the `app` from your file using a default export.
101101

102102
You can manually do the rewrite using the reference file and TS types as guides (IDE support should work for you in `main.wasp.ts`), or you can (and we recommend it!) give the reference main.wasp.ts file to the LLM of your choice and tell it to rewrite your `main.wasp` while following the format in the reference file: we had great results with this!
103103
10. Run `wasp start` to run your app! If you got everything right, your app should work exactly like it did before. The only difference is that it's now reading the Wasp config from `main.wasp.ts` instead of `main.wasp`.
104104
:::tip
105-
Don't forget to have the database running or do the db migrations if needed, as you would normally when running your app in development.
105+
Don't forget, during `wasp start`, to have the database running or do the db migrations if needed, as you would normally when running your app in development.
106106
:::
107107
11. That is it, you are now using Wasp TS config! You can delete `main.wasp.old` file now if you still have it around.
108108

109+
:::caution
110+
If you run `wasp clean` or remove `node_modules` on your own, you will have to rerun `wasp ts-setup`!
111+
:::
112+
109113
Got stuck on any of these steps? Let us know in our <DiscordLink /> and we will help!
110114

111115
## What next?

web/versioned_docs/version-0.15.0/general/wasp-ts-config.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Wasp TS config is an **early preview** feature, meaning it is a little rough and
7878
}
7979
```
8080

81-
5. Add `"type": "module"` to the top level of your `package.json`:
81+
5. Add `"type": "module"` to the top level of your `package.json`, if you don't have it yet:
8282

8383
```json title="package.json"
8484
{
@@ -93,19 +93,23 @@ Wasp TS config is an **early preview** feature, meaning it is a little rough and
9393
9. Create an empty `main.wasp.ts` file and rewrite your `main.wasp.old` in it but in TypeScript.
9494

9595
Check out the [reference main.wasp.ts file](#reference-main-wasp-ts-file) below for details on what the TypeScript API for configuring Wasp looks like.
96-
In short, you'll have to:
97-
1. Import `App` from `wasp-config`
98-
2. Create a new `app` object with `new App()`.
99-
3. Use the `app` object to define parts of your web app like `auth`, `pages`, `query`, `api`...
100-
4. Export the `app` from your file using a default export.
96+
In short, you'll have to:
97+
1. Import `App` from `wasp-config`
98+
2. Create a new `app` object with `new App()`.
99+
3. Use the `app` object to define parts of your web app like `auth`, `pages`, `query`, `api`...
100+
4. Export the `app` from your file using a default export.
101101

102102
You can manually do the rewrite using the reference file and TS types as guides (IDE support should work for you in `main.wasp.ts`), or you can (and we recommend it!) give the reference main.wasp.ts file to the LLM of your choice and tell it to rewrite your `main.wasp` while following the format in the reference file: we had great results with this!
103103
10. Run `wasp start` to run your app! If you got everything right, your app should work exactly like it did before. The only difference is that it's now reading the Wasp config from `main.wasp.ts` instead of `main.wasp`.
104104
:::tip
105-
Don't forget to have the database running or do the db migrations if needed, as you would normally when running your app in development.
105+
Don't forget, during `wasp start`, to have the database running or do the db migrations if needed, as you would normally when running your app in development.
106106
:::
107107
11. That is it, you are now using Wasp TS config! You can delete `main.wasp.old` file now if you still have it around.
108108

109+
:::caution
110+
If you run `wasp clean` or remove `node_modules` on your own, you will have to rerun `wasp ts-setup`!
111+
:::
112+
109113
Got stuck on any of these steps? Let us know in our <DiscordLink /> and we will help!
110114

111115
## What next?

0 commit comments

Comments
 (0)