Add a playground to the docs site
This commit is contained in:
parent
1fc0525940
commit
e39d69dfa7
6 changed files with 316 additions and 2 deletions
|
|
@ -1,4 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
root=$PWD
|
||||
cd docs
|
||||
bundle exec jekyll serve "$@"
|
||||
|
||||
bundle exec jekyll serve "$@" &
|
||||
|
||||
bundle exec ruby <<RUBY &
|
||||
require "listen"
|
||||
dir = "$root/target/release"
|
||||
puts "Watching #{dir}"
|
||||
listener = Listen.to(dir, only: /^tree-sitter\.(js|wasm)$/, wait_for_delay: 3.0) do
|
||||
puts "WASM files updated. Copying to docs folder..."
|
||||
system(
|
||||
"cp",
|
||||
"$root/target/release/tree-sitter.js",
|
||||
"$root/target/release/tree-sitter.wasm",
|
||||
"$root/docs/assets/js/"
|
||||
)
|
||||
end
|
||||
listener.start
|
||||
sleep
|
||||
RUBY
|
||||
|
||||
wait
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue