Merge pull request #1400 from tree-sitter/chore/rename-web-ui-stuff

chore(cli): Rename all internal web_ui stuff to playground
This commit is contained in:
Andrew Hlynskyi 2021-09-22 04:49:48 +03:00 committed by GitHub
commit 6d2a9983d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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(&current_dir, open_in_browser);
playground::serve(&current_dir, open_in_browser);
}
("dump-languages", Some(_)) => {

View file

@ -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");

View file

@ -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