Skip to content

Commit

Permalink
feat: Initial release for Linux/MacOS
Browse files Browse the repository at this point in the history
⚡ Seamlessly integrate ViteJS into your Rust project.

- Embeds Vite output in your binary.
- Optionally manages the Vite dev server lifecycle in Rust.
- Low-touch;
  - No build script changes required.
  - No `package.json` changes required.
  - No Vite config changes, but:
    - this crate forces manifest generation
    - and requires specifying the output directory in Rust if you've changed it from the default in your vite config.

See README.md for more details.
  • Loading branch information
Wulf committed Dec 27, 2024
0 parents commit e083f8e
Show file tree
Hide file tree
Showing 78 changed files with 12,614 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test
on: [push, pull_request]
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/checkout@master
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest] # todo: add 'windows-latest'
rust: [stable]
experimental: [false]
# Note: We're no longer reliant on nightly, so we can remove this.
# Keeping it here for future reference.
#
# # include:
# # # Test on stable -- we expect this to fail, but we want to know when it starts working!
# # - rust: stable
# # os: ubuntu-latest
# # experimental: true
steps:
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- uses: actions/checkout@master
- name: Install npm packages for examples & tests
run: |
(cd ./crates/vite-rs/test_projects && npm ci)
(cd ./crates/vite-rs/examples/vite-project-folder && npm ci)
- name: Run tests # note: this step also compiles examples, but does not run them.
run: |
cargo test
cargo test --release
- name: Run examples
run: |
cargo run --example basic_usage
cargo run --example basic_usage --release
cargo run --example custom_ctrl_c_handler
cargo run --example custom_ctrl_c_handler --release
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
target
node_modules
dist
Loading

0 comments on commit e083f8e

Please sign in to comment.