Skip to content

Commit e268350

Browse files
authored
fix fullstack workspace (#79)
1 parent d8e9fc4 commit e268350

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

Workspace/packages/desktop/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
dioxus = { workspace = true, features = [{{- router_feature -}}] }
7+
dioxus = { workspace = true, features = [{{- dioxus_features -}}] }
88
ui = { workspace = true }
99

1010
[features]

Workspace/packages/mobile/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
dioxus = { workspace = true, features = [{{- router_feature -}}] }
7+
dioxus = { workspace = true, features = [{{- dioxus_features -}}] }
88
ui = { workspace = true }
99

1010
[features]

Workspace/packages/web/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2021"
55

66
[dependencies]
7-
dioxus = { workspace = true, features = [{{- router_feature -}}] }
7+
dioxus = { workspace = true, features = [{{- dioxus_features -}}] }
88
ui = { workspace = true }
99

1010
[features]

Workspace/vars.rhai

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// This file sets variables based on the results of the shared-init script.
22

33
const WORKSPACE_MEMBERS_VAR = "workspace_members";
4-
const ROUTER_FEATURE_VAR = "router_feature";
4+
const DIOXUS_FEATURE_VAR = "dioxus_features";
55

66
const IS_FULLSTACK = "is_fullstack";
77
const IS_ROUTER = "is_router";
@@ -14,9 +14,19 @@ if variable::get(IS_FULLSTACK) {
1414

1515
variable::set(WORKSPACE_MEMBERS_VAR, workspace_members);
1616

17-
// Router feature
17+
// Dioxus features
18+
let features = [];
1819
if variable::get(IS_ROUTER) {
19-
variable::set(ROUTER_FEATURE_VAR, "\"router\"");
20-
} else {
21-
variable::set(ROUTER_FEATURE_VAR, "");
20+
features.push("router");
2221
}
22+
if variable::get(IS_FULLSTACK) {
23+
features.push("fullstack");
24+
}
25+
let features_string = "";
26+
for feature in features {
27+
if features_string.len() > 0 {
28+
features_string += ", ";
29+
}
30+
features_string += "\"" + feature + "\"";
31+
}
32+
variable::set(DIOXUS_FEATURE_VAR, features_string);

0 commit comments

Comments
 (0)