Commit graph

67 commits

Author SHA1 Message Date
Greg Johnston
6c3e2fe53e
feat: update to typed-builder 0.16 (closes #1455) (#1590) 2023-08-26 10:10:42 -04:00
Matt Cuneo
a789100e22
feat: allow autoreload websocket connection to work outside of localhost (#1548)
* Updated client reloading to use window.location.protocol/host to determine websocket connection. Added optional config reload_external_port to provide further control of the client websocket connection. These changes allow reloading while accessing the served site from outside of localhost.
2023-08-25 15:54:22 -04:00
Joseph Cruz
fb52cfa73e fix: needless_raw_string_hashes 2023-07-19 08:43:57 -04:00
Joseph Cruz
14bda76b30 fix: needless_raw_string_hashes (allow) 2023-07-18 20:56:39 -04:00
Joseph Cruz
3481a6ee53
build: run tasks from workpace or member directory (#1339) 2023-07-13 16:46:51 -04:00
Filip Dutescu
3cdcc85c87
feat(config): implement common traits for Env (#1324)
In order to facilitate its usage in other structs, which might derive
various traits, such as `serde::Serialize` or `PartialEq`, implement
them for the `leptos_config::Env` enum.

Signed-off-by: Filip Dutescu <filip@hucksy.dev>
2023-07-11 09:37:42 -04:00
Filip Dutescu
c755dae6ee
feat(leptos-config): kebab-case via serde's rename_all (#1308)
Currently, `leptos::LeptosOptions` are deserialized (and serialized)
to `snake_case`, since, by default, `serde` uses the name of the field
as-is. The options given via `.toml` files are given using `kebab-case`.
This behaviour leads to problems if you wish to use
`leptos::LeptosOptions` as the type of a field in your own config,
which uses the `kebab-case` syntax, as it will not provide any values
to that field.

These changes switch out the previous mechanism of manually replacing
the `-` character to the `_` character in order for serialization to
work. In its place, it uses `serde`'s `#[serde(rename_all = ...)]`
macro to handle the naming convention.

In case other naming conventions are used, a workaround would be to
define a user-owned mirror struct of `leptos::LeptosOptions`, which
would contain the required fields, deserialize it as desired and'
convert it to the latter via, for example, the `From<T>` trait.

Closes: #1295

Signed-off-by: Filip Dutescu <filip@hucksy.dev>
2023-07-11 09:36:55 -04:00
afiqzx
4a3a67bf37
feat: add fallback support for workspace in get_config_from_str (#1249) 2023-06-30 10:44:27 -04:00
Greg Johnston
9723cc466e fix: rust-analyzer/cargo fmt issues with LEPTOS_OUTPUT_NAME 2023-04-24 08:00:36 -04:00
Ben Wishovich
72f8bf4e20
feat: remove need for LEPTOS_OUTPUT_NAME env var after compilation (#899) 2023-04-23 15:20:47 -04:00
Patrick Auernig
4c23f3c478
chore: remove unused fs dependency from leptos_config (#787) 2023-04-02 12:29:30 -04:00
martin frances
81401a738c
chore: bumped typed-builder up to 0.14. (#648) 2023-03-09 16:44:27 -05:00
Vanius Bittencourt
1584ab6b72
feat: refactor leptos_config to allow loading from string (#628) 2023-03-08 19:49:19 -05:00
martin frances
27fb430900
bump typed-builder to version 0.13. (#633) 2023-03-06 09:07:21 -05:00
Fangdun Tsai
e9c4b490e5
feat: viz integration (#506) 2023-02-21 12:29:15 -05:00
Greg Johnston
6bab4ad966
apply new formatting everywhere (#502) 2023-02-11 14:30:06 -05:00
Ben Wishovich
76aeb573bf
fix: convert site_address to site_addr to match cargo-leptos (#462) 2023-02-04 16:37:41 -05:00
Odiseo
fec4ff4381
fix: typo in leptos_config description (#455) 2023-02-03 12:51:26 -05:00
martin frances
0dbcc323ba
Clippy: "{input} is not a supported environment. (#451) 2023-02-03 10:08:23 -05:00
g-re-g
cbfb724af2
Dedup from_str implementations for Env (#426) 2023-02-02 07:18:20 -05:00
martin frances
465cbc36be
Minor: Bump typed-builder from 0.11 to 0.12. (#409) 2023-01-30 19:17:09 -05:00
Greg Johnston
b861f84e40
Fix a large number of small issues in docs (#386)
* Fix example links in docs

* Restore missing CSR READMEs

* Document need to enable features on `leptos_router` and `leptos_meta`

* Add "Is it production ready?" to FAQs

* Document which types are provided as contexts in server integrations

* Fix broken links and other issues in docs
2023-01-26 21:44:01 -05:00
Greg Johnston
ebe5bf4600
Merge pull request #330 from martinfrances107/typed_builder
typed-builder inconsistent version.
2023-01-17 13:53:58 -05:00
Martin
586e9be99a Minor - type-builder version is inconsistent. 2023-01-17 17:23:05 +00:00
Martin
1fe93fd588 Minor: For each sub crate the landing page should be the root README.md. 2023-01-17 17:05:09 +00:00
benwis
10a833d763 Switch get_configuration calls to None and add a note in the docs for
uses of get_configuration()
2023-01-15 12:50:25 -08:00
Greg Johnston
cdf709fb09 0.1.0 2023-01-12 09:57:08 -05:00
Greg Johnston
9e83acfe63 Make cargo fmt happy 2023-01-10 21:18:03 -05:00
hakesson
e324fb6e76 Default site-root to '.' 2023-01-10 10:33:53 +01:00
henrik
75659ce674
Merge branch 'main' into workspace-multi-projects 2023-01-10 09:59:44 +01:00
hakesson
6a68ef67f3 Add LEPTOS prefix to OUTPUT_NAME in all files 2023-01-10 09:26:10 +01:00
hakesson
5bfeb93e3d Make Cargo.toml optional 2023-01-10 08:26:22 +01:00
hakesson
dd9ae1b7b1 Add LEPTOS prefix to OUTPUT_NAME 2023-01-10 08:25:43 +01:00
Greg Johnston
ad34a5d9c6 Update name to leptos-rs/leptos 2023-01-09 21:59:13 -05:00
Greg Johnston
4df3687463 Forbid unsafe code in all packages 2023-01-09 19:48:51 -05:00
hakesson
1ec603ee58 Use envs for workspace config 2023-01-09 20:06:43 +01:00
benwis
6603c44ce2 Minor fixes and revisions 2023-01-08 19:36:24 -08:00
benwis
6576d8eda1 Change site_root default to ".". Hope that cargo-leptos has that check 2023-01-08 14:54:32 -08:00
benwis
dc60c35b58 Rewrite file handlers for Axum, and update all examples to use the new
generated routes. Fix a few issues in the integrations, and reduce the
number of warnings
2023-01-08 14:18:51 -08:00
Martin
7acc309f66 Minor: Clippy format!() all variables now inlined. 2023-01-07 15:46:47 +00:00
Greg Johnston
755ceb7d75 0.1.0-beta 2023-01-02 16:35:00 -05:00
Ben Wishovich
f45d33db73 Move the examples out of the workspace, and standardize naming. All of the SSR examples now work with cargo-leptos 2022-12-31 15:52:19 -08:00
Ben Wishovich
c3fbf13ef3 No leading slashes, and a working todo-app-sqlite example. Improved config section detection 2022-12-30 11:01:01 -08:00
Greg Johnston
70f6297277 Merge branch 'leptos_dom_v2' of https://github.com/jquesada2016/leptos into jquesada2016-leptos_dom_v2 2022-12-29 09:32:12 -05:00
Greg Johnston
b86e7f33dc Bump versions for new cargo-leptos compatible integrations 2022-12-29 08:04:22 -05:00
Greg Johnston
a603531409 Typos 2022-12-29 08:02:56 -05:00
Ben Wishovich
f8f0d9fae0
Merge branch 'main' into cargo-leptos-beta 2022-12-27 12:49:17 -08:00
Ben Wishovich
e23c05a1df Remove unused derives 2022-12-27 11:01:20 -08:00
Ben Wishovich
be94c1b846 Update examples to camelcase and add missing fields for feature flags. Should be working with cargo-leptos beta again 2022-12-27 10:58:05 -08:00
Greg Johnston
5540bb8e8c Bump version to 0.1.0-alpha 2022-12-25 22:58:07 -05:00