-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests, vite handling packaging, e2e, unit
- Loading branch information
Showing
22 changed files
with
800 additions
and
12,186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,50 @@ | ||
# Makefile for building and running WASM projects | ||
|
||
# General settings | ||
WASM_DIR := crates/lora-inspector-wasm | ||
OUT_DIR := pkg | ||
# TARGET := --target bundler | ||
TARGET := --target web | ||
# RELEASE := --release | ||
RELEASE := | ||
# WEAK_REFS := --weak-refs | ||
WEAK_REFS := | ||
|
||
# Default target | ||
.PHONY: all | ||
all: test build-wasm | ||
|
||
# Run tests for the whole workspace | ||
.PHONY: test | ||
test: | ||
cargo test --workspace | ||
cargo test --workspace && \ | ||
make wasm-bindgen-test && \ | ||
yarn --cwd crates/lora-inspector-wasm test && \ | ||
yarn --cwd crates/lora-inspector-wasm e2e-test | ||
|
||
# Build WASM for production (optimized) | ||
.PHONY: build-wasm | ||
build-wasm: | ||
wasm-pack build --target no-modules --out-dir pkg crates/lora-inspector-wasm --release --weak-refs | ||
|
||
build-dev-wasm: | ||
wasm-pack build --target no-modules --out-dir pkg crates/lora-inspector-wasm --release --weak-refs | ||
wasm-pack build $(TARGET) --out-dir $(OUT_DIR) $(WASM_DIR) $(RELEASE) $(WEAK_REFS) && \ | ||
yarn --cwd $(WASM_DIR) build | ||
|
||
# Start a local HTTP server for serving the WASM package (simple) | ||
.PHONY: dev-wasm | ||
dev-wasm: | ||
python -m http.server -d crates/lora-inspector-wasm | ||
make build-wasm && \ | ||
cd $(WASM_DIR) && \ | ||
yarn vite | ||
|
||
# Start a custom server (e.g., with CORS enabled) for development | ||
.PHONY: dev-wasm-cors | ||
dev-wasm-cors: | ||
cd $(WASM_DIR) && python simple-cors-server.py | ||
|
||
.PHONY: | ||
wasm-bindgen-test: | ||
wasm-pack test --headless --firefox crates/lora-inspector-wasm | ||
|
||
dev-wasm-2: | ||
cd crates/lora-inspector-wasm/ && python simple-cors-server.py | ||
# Clean build artifacts (optional) | ||
.PHONY: clean | ||
clean: | ||
rm -rf $(OUT_DIR)/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Dave Lage (rockerBOO) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Web application for LoRA inspector | ||
|
||
## Install | ||
|
||
``` | ||
yarn install --immutable | ||
``` | ||
|
||
## Usage | ||
|
||
### Dev | ||
|
||
``` | ||
yarn dev | ||
``` | ||
|
||
### Build | ||
|
||
``` | ||
yarn build | ||
``` | ||
|
||
### Test | ||
|
||
``` | ||
yarn test | ||
``` |
75 changes: 0 additions & 75 deletions
75
crates/lora-inspector-wasm/assets/js/chartist-plugin-pointlabels.min.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.