From 16470bc0b1a24037cb8a393bc43731a8c39c14cd Mon Sep 17 00:00:00 2001 From: Andrew Hlynskyi Date: Wed, 22 Sep 2021 01:43:32 +0300 Subject: [PATCH] chore(cli): Rename all internal web_ui stuff to playground --- cli/src/lib.rs | 2 +- cli/src/main.rs | 4 ++-- cli/src/{web_ui.html => playground.html} | 0 cli/src/{web_ui.rs => playground.rs} | 2 +- docs/section-6-contributing.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename cli/src/{web_ui.html => playground.html} (100%) rename cli/src/{web_ui.rs => playground.rs} (98%) diff --git a/cli/src/lib.rs b/cli/src/lib.rs index 734b3e6a..7de4afc5 100644 --- a/cli/src/lib.rs +++ b/cli/src/lib.rs @@ -2,6 +2,7 @@ pub mod generate; pub mod highlight; pub mod logger; pub mod parse; +pub mod playground; pub mod query; pub mod query_testing; pub mod tags; @@ -9,7 +10,6 @@ pub mod test; pub mod test_highlight; pub mod util; pub mod wasm; -pub mod web_ui; #[cfg(test)] mod tests; diff --git a/cli/src/main.rs b/cli/src/main.rs index 6687373d..2c18f03f 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -4,7 +4,7 @@ use glob::glob; use std::path::Path; use std::{env, fs, u64}; use tree_sitter_cli::{ - generate, highlight, logger, parse, query, tags, test, test_highlight, util, wasm, web_ui, + generate, highlight, logger, parse, playground, query, tags, test, test_highlight, util, wasm, }; use tree_sitter_config::Config; use tree_sitter_loader as loader; @@ -504,7 +504,7 @@ fn run() -> Result<()> { ("playground", Some(matches)) => { let open_in_browser = !matches.is_present("quiet"); - web_ui::serve(¤t_dir, open_in_browser); + playground::serve(¤t_dir, open_in_browser); } ("dump-languages", Some(_)) => { diff --git a/cli/src/web_ui.html b/cli/src/playground.html similarity index 100% rename from cli/src/web_ui.html rename to cli/src/playground.html diff --git a/cli/src/web_ui.rs b/cli/src/playground.rs similarity index 98% rename from cli/src/web_ui.rs rename to cli/src/playground.rs index 3fcf56f1..f674ce11 100644 --- a/cli/src/web_ui.rs +++ b/cli/src/playground.rs @@ -30,7 +30,7 @@ macro_rules! resource { }; } -resource!(get_main_html, "cli/src/web_ui.html"); +resource!(get_main_html, "cli/src/playground.html"); resource!(get_playground_js, "docs/assets/js/playground.js"); resource!(get_lib_js, "lib/binding_web/tree-sitter.js"); resource!(get_lib_wasm, "lib/binding_web/tree-sitter.wasm"); diff --git a/docs/section-6-contributing.md b/docs/section-6-contributing.md index 685fe5e7..36f5f499 100644 --- a/docs/section-6-contributing.md +++ b/docs/section-6-contributing.md @@ -29,7 +29,7 @@ git clone https://github.com/tree-sitter/tree-sitter cd tree-sitter ``` -Optionally, build the WASM library. If you skip this step, then the `tree-sitter web-ui` command will require an internet connection. If you have emscripten installed, this will use your `emcc` compiler. Otherwise, it will use Docker: +Optionally, build the WASM library. If you skip this step, then the `tree-sitter playground` command will require an internet connection. If you have emscripten installed, this will use your `emcc` compiler. Otherwise, it will use Docker: ```sh ./script/build-wasm