Commit Graph
18 Commits
Author SHA1 Message Date
Brian Donovan 5c62947835 refactor(cli): move check module alongside others (#1304)
There was no reason for `check` to be defined as `check/mod.rs` when all the others were at the top level e.g. `serve.rs`.
2023-08-04 17:00:19 -05:00
Brian Donovan 8f93ff3747 docs(hooks): fix typos (#1299)
I'm not totally sure how the sentence was supposed to read, but removing "state" from "It state" seemed to work. Also, "it's" is "it is" and not possessive, so I fixed that.
2023-08-04 15:13:02 -05:00
Brian Donovan 6d154b5072 Minor Proxy Improvements (#1289)
* fix(serve): provide a clear error with pathless proxy URLs

Without this, `dx serve` panics with this message:

```
Paths must start with a `/`. Use "/" for
 root routes
 ```

 That's not very clear. Instead, we can detect this situation and provide a better error message:

```
Error: 🚫 Serving project failed: Failed to establish proxy: Proxy backend URL must have a non-empty path, e.g. http://localhost:8080/api instead of http://localhost:8080
```

* docs(config): correct format for `web.proxy`
2023-08-04 13:44:56 -05:00
Brian Donovan 50230b6f71 build(web): fix default-features warning (#1296)
`cargo build` would print this warning:

```
warning: dioxus/packages/web/Cargo.toml: `default-features` is ignored for dioxus-html, since `default-features` was not specified for `workspace.dependencies.dioxus-html`, this could become a hard error in the future
```

Since it's being ignored anyway and that doesn't seem to be causing problems, I figured I'd remove it and get rid of the warning.
2023-08-04 12:51:17 -05:00
Brian Donovan ab1d64bc4a docs(cli): fix typo (#1294)
"tripple" should be "triple".
2023-08-04 12:49:31 -05:00
Brian Donovan e98e773186 doc: fix typo (#1287) 2023-08-03 16:32:14 -05:00
Brian Donovan 0e841f8411 fix(check): allow hook calls inside closure hooks 2023-07-24 18:58:19 -07:00
Brian Donovan b51ffa0590 fix(playwright): remove unnecessary awaits (#1239)
`page.locator` is a synchronous method.
2023-07-24 11:36:16 -05:00
Brian Donovan dc7e1a5f13 docs(clean): fix copy-paste docs from build (#1240) 2023-07-24 11:32:13 -05:00
Brian Donovan 420bc39ecc docs(cli): re-sync dx --help output 2023-07-23 18:57:23 -07:00
Brian Donovan 8f8627af18 attempt to hoist prettier-please dependencies 2023-07-23 16:06:55 -07:00
Brian Donovan 1531893a45 improve test coverage and display output 2023-07-23 16:06:55 -07:00
Brian Donovan 899d9562b3 fix(check): colorize line numbers a la rustc 2023-07-23 16:06:55 -07:00
Brian Donovan eb4438ef74 docs(check): update README
It was just copy-pasted from `dioxus-autofmt`.
2023-07-23 16:06:55 -07:00
Brian Donovan 2c2534d1cc feat(check): adds dx check
At the moment this only checks the Rules of Hooks, ensuring that hook functions (i.e. `use_*`) are being called as expected.

https://dioxuslabs.com/docs/0.3/guide/en/interactivity/hooks.html

Closes #1202
2023-07-23 16:06:55 -07:00
Brian Donovan 947b7b650e chore: rename playwrite to playwright (#1203)
I assume this was a mistake and not intentional.
2023-07-17 11:00:59 -05:00
Brian Donovan 9cef71b6b9 fix(cli): improve error message for invalid config (#1200)
Previously an invalid `Dioxus.toml` file would yield this error when running e.g. `dx serve`:

```
Error: Failed to load `Dioxus.toml` because: Dioxus.toml parse failed
```

This doesn't give any indication why it failed to parse. This commit updates it to include why the parsing failed, e.g.:

```
Error: Failed to load Dioxus config because: Dioxus.toml missing field `name` for key `application` at line 38 column 1
```

I initially had it format the message to include `Dioxus.toml:38:1` to be clickable in some terminals, but the location specified didn't always seem particularly relevant to the actual problem so I left it as-is.

This also fixes what I believe would be an issue on case-sensitive file systems where if `dioxus.toml` existed it would try to read `Dioxus.toml`.

I'm still fairly new to Rust, so the `.as_path()` calls may not be the best way to deal with the fact that the borrow checker wouldn't let me re-use `crate_dir` and `dioxus_conf_file`. I'm open to suggestions!
2023-07-15 11:13:22 -05:00
Brian Donovan cad19fb59f docs: fix typo in use_effect description 2023-07-14 18:38:11 -04:00