docs(readme): Start adding documentation for React version
This commit is contained in:
1 parent
ec51cb7a6c
commit
6658623f1f
365 files changed
+52155
-15
No files matched your search
+37
-6
@@ -2,11 +2,42 @@ cd docs
|
||||
yarn -v
|
||||
node -v
|
||||
echo 'Installing Gitbook CLI'
|
||||
yarn install
|
||||
yarn global add gitbook-cli
|
||||
|
||||
echo 'Running Gitbook installation'
|
||||
./node_modules/gitbook-cli/bin/gitbook.js install
|
||||
./node_modules/gitbook-cli/bin/gitbook.js build
|
||||
|
||||
# Generate all version's GitBook output
|
||||
for D in *; do
|
||||
if [ -d "${D}" ]; then
|
||||
echo "Generating output for: ${D}"
|
||||
cd "${D}"
|
||||
|
||||
# Clear previous output, generate new
|
||||
rm -rf _book
|
||||
gitbook install
|
||||
gitbook build
|
||||
|
||||
cd ..
|
||||
fi
|
||||
done
|
||||
|
||||
# Move CNAME File into `latest`
|
||||
cp CNAME ./latest/CNAME
|
||||
|
||||
# Create a history folder in our latest version's output
|
||||
mkdir ./latest/_book/history
|
||||
|
||||
# Move each version's files to latest's history folder
|
||||
for D in *; do
|
||||
if [ -d "${D}" ]; then
|
||||
if [[ "${D}" == v* ]] ; then
|
||||
echo "Moving ${D} to the latest version's history folder"
|
||||
|
||||
mkdir "./latest/_book/history/${D}"
|
||||
mv -v "./${D}/_book"/* "./latest/_book/history/${D}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
|
||||
# Build and copy the StandaloneViewer into the static directory
|
||||
@@ -24,6 +55,6 @@ yarn run prepare
|
||||
sed -i "s,http://localhost:5000,${ROOT_URL},g" index.html
|
||||
sed -i 's,"routerBasename": "/","routerBasename": "/demo",g' index.html
|
||||
rm -rf node_modules
|
||||
mkdir ../../../docs/_book/demo/
|
||||
cp -R * ../../../docs/_book/demo/
|
||||
cp ../../../_redirects ../../../docs/_book/_redirects
|
||||
mkdir ../../../docs/latest/_book/demo/
|
||||
cp -R * ../../../docs/latest/_book/demo/
|
||||
cp ../../../_redirects ../../../docs/latest/_book/_redirects
|
||||
Reference in new issue
Block a user