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

Implement querystring #69

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Next Next commit
fix xtask for windows
  • Loading branch information
Heiss committed Mar 2, 2023
commit b9ddeaadc19647aefbe822e12b8ed0d6b3820a3c
9 changes: 9 additions & 0 deletions xtask/src/main.rs
Original file line number Diff line number Diff line change
@@ -35,11 +35,20 @@ fn main() -> anyhow::Result<()> {
fn build() -> anyhow::Result<()> {
cmd!("wasm-pack build --no-typescript --target web").run()?;
fs::copy("pkg/caniuse_rs_bg.wasm", "public/caniuse_rs.wasm")?;
#[cfg(target_os = "linux")]
cmd!("rollup src/main.js --format iife --file public/caniuse_rs.js").run()?;
#[cfg(target_os = "windows")]
cmd!("rollup.cmd src/main.js --format iife --file public/caniuse_rs.js").run()?;


let static_files: Vec<_> =
fs::read_dir("static")?.map(|entry| Ok(entry?.path())).collect::<io::Result<_>>()?;
#[cfg(target_os = "linux")]
cmd!("cp -r {static_files...} public/").run()?;
#[cfg(target_os = "windows")]
for file in static_files.iter() {
cmd!("xcopy {file} public /i /s /y /q").run()?;
}

Ok(())
}