From db5fddb00959dabd174bff1f60360cbebfd59bb1 Mon Sep 17 00:00:00 2001 From: Martin Sosic Date: Thu, 10 Oct 2024 16:52:33 +0200 Subject: [PATCH] Added links to Wasp TS config in the docs / changelog. --- waspc/ChangeLog.md | 14 +++++--------- web/docs/general/language.md | 4 ++++ web/docs/tutorial/02-project-structure.md | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/waspc/ChangeLog.md b/waspc/ChangeLog.md index 6e426aa19a..6f83ca68fe 100644 --- a/waspc/ChangeLog.md +++ b/waspc/ChangeLog.md @@ -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: @@ -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({ @@ -57,14 +57,10 @@ 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 @@ -72,7 +68,7 @@ There are some breaking changes with React Router 6 which will require you to up 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 diff --git a/web/docs/general/language.md b/web/docs/general/language.md index 9931cd0aed..6f3250f273 100644 --- a/web/docs/general/language.md +++ b/web/docs/general/language.md @@ -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! diff --git a/web/docs/tutorial/02-project-structure.md b/web/docs/tutorial/02-project-structure.md index 0f98a57f51..856479b59d 100644 --- a/web/docs/tutorial/02-project-structure.md +++ b/web/docs/tutorial/02-project-structure.md @@ -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: