Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync #57

Merged
merged 14 commits into from
May 14, 2024
Merged

sync #57

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
deploy:
runs-on: ubuntu-latest
runs-on: macos-latest

steps:
- name: Checkout Code
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/gh-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ name: Test and release web

on:
push:
branches: [release]
branches: [master]
workflow_dispatch:

permissions:
contents: write # for committing to gh-pages branch.



defaults:
run:
working-directory: utils-web


jobs:
verify:
timeout-minutes: 10
Expand All @@ -21,7 +28,7 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: just@1
- run: just lint
# - run: just lint
build-github-pages:
needs: verify
runs-on: ubuntu-latest
Expand All @@ -39,17 +46,21 @@ jobs:
run: npm install -D tailwindcss
- name: Download and install Trunk binary
run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-
- name: install runst tool chain
run: curl -y --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- name: add wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Build # build
# "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository
# using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico .
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
# relatively as favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
# will obviously return error 404 not found.
run: cd utils-web && ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
run: ./trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
folder: utils-web/dist
# this option will not maintain any history of your previous pages deployment
# set to false if you want all page build to be committed to your gh-pages branch history
single-commit: true
42 changes: 42 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@_list:
just --list --unsorted


alias r := run

bt := '0'

log := "warn"

export JUST_LOG := log

watch:
cargo watch -c -- just verify

run:
trunk serve

test:
cargo test --target wasm32-unknown-unknown

# Perform all verifications (compile, test, lint etc.)
verify: test lint

# Run the static code analysis
lint:
cargo fmt --check

clean:
rm -rf target
rm -f Cargo.lock
rm -rf node_modules


fmt:
cargo fmt


install-tailwindcss:
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
mv tailwindcss-linux-x64 /usr/bin/tailwindcss
1 change: 0 additions & 1 deletion utils-web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ leptos_router = { version = "0.6.11", features = ["csr"] }
leptos_meta = { version = "0.6.11", features = ["csr"] }
gloo-net = { version = "0.2", features = ["http"] }
log = "0.4.21"
stylers = "0.3.2"



Expand Down
42 changes: 42 additions & 0 deletions utils-web/justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@_list:
just --list --unsorted


alias r := run

bt := '0'

log := "warn"

export JUST_LOG := log

watch:
cargo watch -c -- just verify

run:
trunk serve

test:
cargo test --target wasm32-unknown-unknown

# Perform all verifications (compile, test, lint etc.)
verify: test lint

# Run the static code analysis
lint:
cargo fmt --check

clean:
rm -rf target
rm -f Cargo.lock
rm -rf node_modules


fmt:
cargo fmt


install-tailwindcss:
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/latest/download/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
mv tailwindcss-linux-x64 /usr/bin/tailwindcss
3 changes: 3 additions & 0 deletions utils-web/src/components/button.rs
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@

pub fn button(){

}
5 changes: 0 additions & 5 deletions utils-web/src/components/button/button.scss

This file was deleted.

Empty file.
4 changes: 4 additions & 0 deletions utils-web/src/components/card.rs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@


pub fn card(){

}
4 changes: 4 additions & 0 deletions utils-web/src/components/input.rs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@


pub fn input(){

}
4 changes: 4 additions & 0 deletions utils-web/src/components/text.rs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@


pub fn text(){

}
4 changes: 4 additions & 0 deletions utils-web/src/components/view.rs
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@


pub fn view(){

}
Loading