Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to account for recent changes #808

Merged
merged 72 commits into from
Nov 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
4e09b34
Separate ext code to client and server
sodic Oct 12, 2022
86e70fe
Use skeleton in createNewProject and refactor
sodic Oct 14, 2022
bb4107e
Refactor Lib.hs to use ExceptT
sodic Oct 14, 2022
cc7f353
Fix formatting
sodic Oct 14, 2022
492f247
Pop up returns
sodic Oct 14, 2022
d88e204
Extract liftIO and add a do block
sodic Oct 17, 2022
51b426a
Address some review comments
sodic Oct 24, 2022
789dc8f
Add skeleton comment
sodic Oct 24, 2022
6d29601
Extract common CommandError message
sodic Oct 24, 2022
11846e7
Separate skeleton comment into two rows
sodic Oct 24, 2022
4f834ec
Move server and client dirs into src
sodic Oct 24, 2022
385b35c
Simplify maybeToEither
sodic Oct 25, 2022
a7753d2
Further refactor Lib.hs
sodic Oct 25, 2022
53dc889
Further simplify skeleton comment
sodic Oct 25, 2022
8388b0f
Merge branch 'main' into filip-change-project-structure
sodic Oct 25, 2022
40f56d2
Add shared code directory to project structure
sodic Oct 31, 2022
936116b
Update e2e test inputs
sodic Oct 31, 2022
1d4e0d8
Update e2e test outputs
sodic Oct 31, 2022
dc753f4
Fix formatting
sodic Oct 31, 2022
281c3cf
Fix bug in compile function
sodic Oct 31, 2022
a64832c
Change map to fmap in compile function
sodic Oct 31, 2022
b30e3de
Fix formatting
sodic Oct 31, 2022
f40a8ce
Force git to include empty directories
sodic Oct 31, 2022
ddc8682
Remove extra empty line from .gitkeep files
sodic Oct 31, 2022
94a11a7
Add .jsconfig to enable go-to-definition
sodic Oct 31, 2022
eb29d50
Watch shared directory for changes
sodic Oct 31, 2022
c85fee3
Merge remote-tracking branch 'origin/filip-change-project-structure' …
sodic Oct 31, 2022
efca38a
Add final newline to jsconfigs
sodic Oct 31, 2022
9fa7e9a
Fix regular and e2e tests
sodic Oct 31, 2022
fd5d9db
Merge remote-tracking branch 'origin/filip-change-project-structure' …
sodic Oct 31, 2022
661b282
Update e2e tests
sodic Oct 31, 2022
8674887
Fix cli template packaging and update todoApp
sodic Nov 4, 2022
997fe72
Merge remote-tracking branch 'origin/main' into filip-change-project-…
sodic Nov 4, 2022
0cb6369
Add a shared function demo to todoApp
sodic Nov 4, 2022
25a1a54
Merge remote-tracking branch 'origin/filip-change-project-structure' …
sodic Nov 4, 2022
8bb94cc
Update waspc and e2e tests
sodic Nov 4, 2022
5f47855
Fix compiler warnings and rename function
sodic Nov 4, 2022
54e0b02
Rename mkError to mkParserError
sodic Nov 4, 2022
0ae2631
Remove redundant empty line
sodic Nov 4, 2022
c5c326e
Merge remote-tracking branch 'origin/main' into filip-change-project-…
sodic Nov 4, 2022
fc76fb6
Fix test warnings
sodic Nov 4, 2022
dc29140
Fix formatting
sodic Nov 4, 2022
36e5766
Merge remote-tracking branch 'origin/main' into filip-change-project-…
sodic Nov 7, 2022
ca662e8
Update waspc.cabal with jsconfigs
sodic Nov 7, 2022
b13cd32
Merge remote-tracking branch 'origin/filip-change-project-structure' …
sodic Nov 7, 2022
cd101ab
Merge branch 'main' into filip-change-project-structure
sodic Nov 7, 2022
d10e877
Minimize jsconfig.json files
sodic Nov 7, 2022
cb3351c
Add jsconfigs to waspc todoApp
sodic Nov 7, 2022
48d7e27
Update e2e tests
sodic Nov 7, 2022
0ab3560
Update e2e tests
sodic Nov 7, 2022
bed02f1
Merge branch 'main' into filip-change-project-structure
sodic Nov 7, 2022
ee84bce
Update docs for new project structure
sodic Nov 9, 2022
313d2b7
Update todoApp example to new structure
sodic Nov 9, 2022
f384d14
Fix directory tree watching on wasp start
sodic Nov 9, 2022
2a214ec
Merge branch 'filip-change-project-structure' into filip-js-go-to-def…
sodic Nov 9, 2022
d4a4c07
Implement review feedback
sodic Nov 9, 2022
399057c
Fix typo in docs
sodic Nov 9, 2022
96b6b1e
Fix typo in docs
sodic Nov 9, 2022
87c7c71
Fix another typo in docs
sodic Nov 9, 2022
8e88877
Add src prefix to file path in docs
sodic Nov 9, 2022
da2eb32
Merge branch 'filip-change-project-structure' into filip-js-go-to-def…
sodic Nov 9, 2022
2c42e99
Merge branch 'filip-js-go-to-definition' into filip-update-docs-new-s…
sodic Nov 9, 2022
d4eaa5e
Merge remote-tracking branch 'origin/filip-update-docs-new-structure'…
sodic Nov 9, 2022
06f0b35
Apply suggestions from code review
sodic Nov 10, 2022
fe75413
Address code review comments
sodic Nov 10, 2022
a89df79
Fix incorrect path in docs
sodic Nov 10, 2022
5502285
Fix references to ext in docs
sodic Nov 10, 2022
ccf96ff
Further update docs to new structure
sodic Nov 11, 2022
145fb46
Update typo on frontpage
sodic Nov 11, 2022
39411d5
Add missing src in docs
sodic Nov 11, 2022
2a592c0
Merge remote-tracking branch 'origin/main' into filip-update-docs-new…
sodic Nov 11, 2022
677e4b5
Merge remote-tracking branch 'origin/filip-update-docs-new-structure'…
sodic Nov 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions examples/tutorials/TodoApp/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
/.wasp/
/.env.server
/.env.client
2 changes: 1 addition & 1 deletion examples/tutorials/TodoApp/.wasproot
Original file line number Diff line number Diff line change
@@ -1 +1 @@
File marking the root of Wasp project.
File marking the root of Wasp project.
12 changes: 6 additions & 6 deletions examples/tutorials/TodoApp/main.wasp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ app TodoApp {
route RootRoute { path: "/", to: MainPage }
page MainPage {
authRequired: true,
component: import Main from "@ext/MainPage.js"
component: import Main from "@client/MainPage.js"
}

route SignupRoute { path: "/signup", to: SignupPage }
page SignupPage {
component: import Signup from "@ext/SignupPage"
component: import Signup from "@client/SignupPage"
}

route LoginRoute { path: "/login", to: LoginPage }
page LoginPage {
component: import Login from "@ext/LoginPage"
component: import Login from "@client/LoginPage"
}

entity User {=psl
Expand All @@ -50,16 +50,16 @@ entity Task {=psl
psl=}

query getTasks {
fn: import { getTasks } from "@ext/queries.js",
fn: import { getTasks } from "@server/queries.js",
entities: [Task]
}

action createTask {
fn: import { createTask } from "@ext/actions.js",
fn: import { createTask } from "@server/actions.js",
entities: [Task]
}

action updateTask {
fn: import { updateTask } from "@ext/actions.js",
fn: import { updateTask } from "@server/actions.js",
entities: [Task]
}
27 changes: 27 additions & 0 deletions examples/tutorials/TodoApp/src/client/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
// The following settings enable IDE support in user-provided source files.
// Editing them might break features like import autocompletion and
// definition lookup. Don't change them unless you know what you're doing.
//
// The relative path to the generated web app's root directory. This must be
// set to define the "paths" option.
"baseUrl": "../../.wasp/out/web-app/",
"paths": {
// Resolve all "@wasp" imports to the generated source code.
"@wasp/*": [
"src/*"
],
// Resolve all non-relative imports to the correct node module. Source:
// https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
"*": [
// Start by looking for the definiton inside the node modules root
// directory...
"node_modules/*",
// ... If that fails, try to find it inside definitely-typed type
// definitions.
"node_modules/@types/*"
]
}
}
}
27 changes: 27 additions & 0 deletions examples/tutorials/TodoApp/src/server/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"compilerOptions": {
// The following settings enable IDE support in user-provided source files.
// Editing them might break features like import autocompletion and
// definition lookup. Don't change them unless you know what you're doing.
//
// The relative path to the generated web app's root directory. This must be
// set to define the "paths" option.
"baseUrl": "../../.wasp/out/server/",
"paths": {
// Resolve all "@wasp" imports to the generated source code.
"@wasp/*": [
"src/*"
],
// Resolve all non-relative imports to the correct node module. Source:
// https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
"*": [
// Start by looking for the definiton inside the node modules root
// directory...
"node_modules/*",
// ... If that fails, Try to find it inside definitely-typed type
// definitions.
"node_modules/@types/*"
]
}
}
}
23 changes: 23 additions & 0 deletions examples/tutorials/TodoApp/src/shared/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
// The following settings enable IDE support in user-provided source files.
// Editing them might break features like import autocompletion and
// definition lookup. Don't change them unless you know what you're doing.
//
// The relative path to the generated web app's root directory. This must be
// set to define the "paths" option.
"baseUrl": "../../.wasp/out/server",
"paths": {
// Resolve all non-relative imports to the correct node module. Source:
// https://www.typescriptlang.org/docs/handbook/module-resolution.html#path-mapping
"*": [
// Start by looking for the definiton inside the node modules root
// directory...
"node_modules/*",
// ... If that fails, try to find it inside definitely-typed type
// definitions.
"node_modules/@types/*"
]
}
}
}
2 changes: 1 addition & 1 deletion web/docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Discord (chat): https://discord.gg/rzdnErX
To setup Bash completion, execute `wasp completion` and follow the instructions.

### In project
- `wasp start` runs Wasp app in development mode. It opens a browser tab with your application running, and watches for any changes to .wasp or files in ext/ to automatically reflect in the browser. It also shows messages from web app, server and database on stdout/stderr.
- `wasp start` runs Wasp app in development mode. It opens a browser tab with your application running, and watches for any changes to .wasp or files in `src/` to automatically reflect in the browser. It also shows messages from the web app, the server and the database on stdout/stderr.

- `wasp clean` deletes all generated code and other cached artifacts. If using SQlite, it also deletes the SQlite database. It is the Wasp equivalent to "try shutting it down and turning back on".

Expand Down
22 changes: 14 additions & 8 deletions web/docs/integrations/css-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
To enable support for Tailwind in your Wasp project, you simply need to add two config files (`tailwind.config.js` and `postcss.config.js`) to the root directory. When they are present, Wasp will add the necessary NPM dependencies and copy your config files into the generated project output. You can then start adding [Tailwind CSS directives](https://tailwindcss.com/docs/functions-and-directives#directives) to your CSS files and `className`s to your React components.

### New project tree overview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating this one

```bash title="tree ." {3,7-8}
```bash title="tree ." {6,13-14}
.
├── ext
│   ├── Main.css
│   ├── MainPage.js
│   └── waspLogo.png
├── main.wasp
├── src
│   ├── client
│   │   ├── jsconfig.json
│   │   ├── Main.css
│   │   ├── MainPage.js
│   │   └── waspLogo.png
│   ├── server
│   │   └── jsconfig.json
│   └── shared
│   └── jsconfig.json
├── postcss.config.js
└── tailwind.config.js
```
Expand Down Expand Up @@ -48,8 +54,8 @@ module.exports = {
}
```

#### 3) Update `./ext/Main.css`
```css title="./ext/Main.css" {1-3}
#### 3) Update `./src/client/Main.css`
```css title="./src/client//Main.css" {1-3}
@tailwind base;
@tailwind components;
@tailwind utilities;
Expand All @@ -58,7 +64,7 @@ module.exports = {
```

#### 4) Start using Tailwind 🥳
```html title="./ext/MainPage.js"
```html title="./src/client/MainPage.js"
<h1 className="text-3xl font-bold underline">
Hello world!
</h1>
Expand Down
Loading