Skip to content

Commit d986aee

Browse files
authored
feat: setup command (#454)
Inlines the HTTP Server File Explorer Plugin to be installed by default when running the CLI Command: `setup`. <!-- Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->
1 parent 1bfc1e6 commit d986aee

File tree

17 files changed

+280
-45
lines changed

17 files changed

+280
-45
lines changed

.editorconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
root = true
2+
3+
[Makefile]
4+
indent_style = tab
5+
indent_size = 2

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,8 @@ dhat-heap.json
6161
# Web #
6262
#######
6363
dist
64+
65+
# Plugins #
66+
###########
67+
crates/http-server/inline/*
68+
!crates/http-server/inline/.gitkeep

Cargo.lock

Lines changed: 131 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ async-trait = "0.1.83"
1818
bytes = "1.7.1"
1919
chrono = "0.4.38"
2020
clap = "4.5.20"
21+
dirs = "5.0.1"
2122
futures = "0.3.31"
2223
gloo = "0.11.0"
2324
gloo-file = "0.3.0"

Justfile

Lines changed: 0 additions & 26 deletions
This file was deleted.

Makefile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.PHONY: default
2+
3+
default:
4+
@echo No default target.
5+
6+
dev: ui-build plugin-build
7+
cargo b --all && cargo r
8+
9+
release: plugin-build
10+
make -C ./crates/file-explorer-plugin release
11+
12+
plugin-build: ui-release
13+
make -C ./crates/file-explorer-plugin release
14+
15+
ui-build:
16+
make -C ./crates/file-explorer-ui build
17+
18+
ui-dev:
19+
@echo Starting File Explorer UI…
20+
make -C ./crates/file-explorer-ui dev
21+
22+
ui-fmt:
23+
make -C ./crates/file-explorer-ui fmt
24+
25+
ui-release:
26+
make -C ./crates/file-explorer-ui release
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.PHONY: default
2+
3+
default:
4+
@echo No default target.
5+
6+
release:
7+
@echo Building file-explorer-plugin…
8+
cargo b --release
9+
cp ../../target/release/libfile_explorer_plugin.dylib ../http-server/inline/file_explorer.plugin.httprs

crates/file-explorer-ui/Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.PHONY: default
2+
3+
default:
4+
@echo No default target.
5+
6+
build:
7+
trunk build --locked --config ./Trunk.toml
8+
9+
dev:
10+
trunk serve --config ./Trunk.toml
11+
12+
fmt:
13+
@leptosfmt --version >/dev/null 2>&1 || (echo "Error: leptosfmt is required."; exit 1)
14+
leptosfmt ./src/**/*.rs
15+
16+
release:
17+
trunk build --release --locked --config ./Trunk.toml

0 commit comments

Comments
 (0)