Skip to content

Commit

Permalink
Added links to Wasp TS config in the docs / changelog.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martinsos committed Oct 10, 2024
1 parent 27fd80d commit db5fddb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
14 changes: 5 additions & 9 deletions waspc/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#### Write your app config in TypeScript (preview feature)

Wasp 0.15.0 ships a preview feature that lets you define your app using TypeScript instead of the Wasp language.
Wasp 0.15.0 ships a preview feature that lets you define your app in `main.wasp.ts` using TypeScript instead of in `main.wasp` using the Wasp DSL.

So, instead of this:

Expand Down Expand Up @@ -39,10 +39,10 @@ You can now write this:
improt { App } from 'wasp-config'

const app = new App('TodoApp', {
title: 'TodoApp',
wasp: {
version: '^0.15.0',
},
title: 'TodoApp',
})

app.auth({
Expand All @@ -57,22 +57,18 @@ const mainPage = app.page('MainPage', {
authRequired: true,
component: { import: 'MainPage', from: '@src/MainPage' },
})

app.route('RootRoute', {
path: '/',
to: mainPage,
})
app.route('RootRoute', { path: '/', to: mainPage })
```

To learn more about this feature and how to activate it, check out the docs.
To learn more about this feature and how to activate it, check out the [Wasp TS config docs](https://wasp-lang.dev/docs/general/wasp-ts-config).

### ⚠️ Breaking Changes

There are some breaking changes with React Router 6 which will require you to update your code.
Also, the new version of Prisma may cause breaking changes depending on how you're using it.


Read more about breaking changes in the migration guide: https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15
Read more about breaking changes in the migration guide: https://wasp-lang.dev/docs/migration-guides/migrate-from-0-14-to-0-15 .

### 🐞 Bug fixes

Expand Down
4 changes: 4 additions & 0 deletions web/docs/general/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ title: Wasp Language (.wasp)

Wasp language (what you write in .wasp files) is a declarative, statically typed, domain-specific language (DSL).

:::tip Wasp TS config [Early-preview feature]
If you wish, you can alternatively define your [Wasp config in TS](./wasp-ts-config.md) (`main.wasp.ts`) instead of `main.wasp`.
:::

It is a quite simple language, closer to JSON, CSS or SQL than to e.g. Javascript or Python, since it is not a general programming language, but more of a configuration language.

It is pretty intuitive to learn (there isn't much to learn really!) and you can probably do just fine without reading this page and learning from the rest of the docs as you go, but if you want a bit more formal definition and deeper understanding of how it works, then read on!
Expand Down
4 changes: 4 additions & 0 deletions web/docs/tutorial/02-project-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ Let's take a closer look at `main.wasp`
`main.wasp` is your app's definition file.
It defines the app's central components and helps Wasp to do a lot of the legwork for you.

:::tip Wasp TS config [Early-preview feature]
If you wish, you can alternatively define your [Wasp config in TS](../general/wasp-ts-config.md) (`main.wasp.ts`) instead of `main.wasp`.
:::

The file is a list of _declarations_. Each declaration defines a part of your app.

The default `main.wasp` file generated with `wasp new` on the previous page looks like this:
Expand Down

0 comments on commit db5fddb

Please sign in to comment.