diff --git a/.cargo/config b/.cargo/config index 9f9b24a4929..92a3acfd0b7 100644 --- a/.cargo/config +++ b/.cargo/config @@ -5,8 +5,6 @@ gen-syntax = "run --package ra_tools --bin ra_tools -- gen-syntax" # Extracts the tests from gen-tests = "run --package ra_tools --bin ra_tools -- gen-tests" -build-website = "run --package website-gen" - # Installs the visual studio code extension install-ra = "run --package ra_tools --bin ra_tools -- install-ra" install-code = "run --package ra_tools --bin ra_tools -- install-ra" # just an alias diff --git a/.travis.yml b/.travis.yml index 65a08cbcd12..7d66f72d8fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: language: rust rust: stable script: - - cargo build-website + - cargo doc --all --no-deps env: - RUSTFLAGS="-D warnings", CARGO_INCREMENTAL=0 @@ -59,7 +59,7 @@ deploy: skip-cleanup: true github-token: $DOCS_TOKEN # Set in the settings page of your repository, as a secure variable keep-history: false - local-dir: target/website/ + local-dir: target/doc on: branch: master condition: $DEPLOY_DOCS = 1 diff --git a/Cargo.toml b/Cargo.toml index c7e1f1215a9..6ec176cf709 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -members = [ "crates/*", "website/website-gen" ] +members = [ "crates/*" ] [profile.dev] debug = 1 # only line info diff --git a/README.md b/README.md index e249c648635..55d91a70a14 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ https://rust-lang.zulipchat.com/#narrow/stream/185405-t-compiler.2Frls-2.2E0 ## Quick Links * Work List: https://paper.dropbox.com/doc/RLS-2.0-work-list--AZ3BgHKKCtqszbsi3gi6sjchAQ-42vbnxzuKq2lKwW0mkn8Y -* API docs: https://rust-analyzer.github.io/rust-analyzer/api-docs/ra_ide_api/ +* API docs: https://rust-analyzer.github.io/rust-analyzer/ra_ide_api/ * CI: https://travis-ci.org/rust-analyzer/rust-analyzer ## License diff --git a/website/src/index.html b/website/src/index.html deleted file mode 100644 index 6fe22227bcd..00000000000 --- a/website/src/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - Hello World! Site Title - - - -

rust-analyzer

- - - - diff --git a/website/src/wasm-demo/index.html b/website/src/wasm-demo/index.html deleted file mode 100644 index e81ccb0f720..00000000000 --- a/website/src/wasm-demo/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Hello World! Site Title - - - - TBD - - - diff --git a/website/website-gen/Cargo.toml b/website/website-gen/Cargo.toml deleted file mode 100644 index b471a81fd02..00000000000 --- a/website/website-gen/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "website-gen" -version = "0.0.0" -authors = ["Aleksey Kladov "] -edition = "2018" -publish = false - -[dependencies] -walkdir = "2.2.0" diff --git a/website/website-gen/src/main.rs b/website/website-gen/src/main.rs deleted file mode 100644 index 7d35a37cf3b..00000000000 --- a/website/website-gen/src/main.rs +++ /dev/null @@ -1,64 +0,0 @@ -use std::{fs, path::Path, process::Command}; - -type Result = std::result::Result>; - -/// This tool builds the github-pages website to the `./target/website` folder -fn main() { - if let Err(err) = try_main() { - eprintln!("{}", err); - std::process::exit(-1); - } -} - -fn try_main() -> Result<()> { - check_cwd()?; - build_scaffold()?; - build_docs()?; - println!("Finished\n./target/website/index.html"); - Ok(()) -} - -fn cargo() -> Command { - Command::new("cargo") -} - -fn check_cwd() -> Result<()> { - let toml = std::fs::read_to_string("./Cargo.toml")?; - if !toml.contains("[workspace]") { - Err("website-gen should be run from the root of workspace")?; - } - Ok(()) -} - -fn build_docs() -> Result<()> { - let status = cargo().args(&["doc", "--all", "--no-deps"]).status()?; - if !status.success() { - Err("cargo doc failed")?; - } - sync_dir("./target/doc", "./target/website/api-docs")?; - Ok(()) -} - -fn build_scaffold() -> Result<()> { - sync_dir("./website/src", "./target/website") -} - -fn sync_dir(src: impl AsRef, dst: impl AsRef) -> Result<()> { - return sync_dir(src.as_ref(), dst.as_ref()); - - fn sync_dir(src: &Path, dst: &Path) -> Result<()> { - let _ = fs::remove_dir_all(dst); - fs::create_dir_all(dst)?; - for entry in walkdir::WalkDir::new(src) { - let entry = entry?; - let src_path = entry.path(); - let dst_path = dst.join(src_path.strip_prefix(src)?); - if src_path.is_dir() { - fs::create_dir_all(dst_path)?; - } else { - fs::copy(src_path, dst_path)?; - } - } - Ok(()) - } -}