To get your development environment setup, you'll need to have installed the following:
- cargo, the package manager for Rust
- wasm-pack, for working with rust generated WebAssembly
- mdbook, if working on mdbook-infisearch plugin
- Any nightly rust toolchain set as the default build toolchain
After you have installed the above dependencies, and cloned the repository, run npm run setup
to install npm-related dependencies. This command also symlinks the all npm packages locally, including the ones generated by wasm-pack.
Simply run npm run devDocsFull
to build the project and launch the mdBook development server at localhost:8000
, you will need to have installed the above dependencies for this.
If making minor edits where you don't need to preview the live site, you can also use any markdown file editor.
npm run devDocsFull
uses mdBook's local development server, which is fine for documentation updates. To launch a Webpack development server for frontend development, use the npm run serve
command. The site will be available at localhost:8080
, after which click the Docs
button to use that site.
The WebAssembly binary build process is also separate from npm run serve
. Concurrently use the npm run watchPerfWorker
command to run a webpack watcher for the WebWorker and WebAssembly bundles.
To use custom test files, place them under the <project-root>/test_files/1/source
directory. If not using HTML, you will need to configure the data and field mappings as well.
Once you have you test files placed in the correct folder per the previous chapter, run the npm run index1R
script to index your content.
The process for launching the frontend and WebAssembly processes is the same as using the docs. There are a few buttons in the development site to switch between the folders quickly.
There are also npm run index2R/3R
scripts available, which use the test_files/2
and test_files/3
folders.