diff --git a/.circleci/update-docs.sh b/.circleci/update-docs.sh
old mode 100644
new mode 100755
index 963940443..0546a6821
--- a/.circleci/update-docs.sh
+++ b/.circleci/update-docs.sh
@@ -7,12 +7,27 @@ cd "$(dirname "$0")"
## Generate DOCMA API Docs
cd ..
npm run docs:api
-cd ./.circleci/
+
+# Try to patch Gitbook's broken deep dependency on graceful-fs
+npm install --save gitbook-cli
+cd node_modules/gitbook-cli/node_modules/npm
+npm install graceful-fs@4.2.0 --save
+cd ../../
+./bin/gitbook.js fetch
+cd ../../
+
+# Generate latest output
+# Clear previous output, generate new
+cd ./docs/latest
+rm -rf _book
+../../node_modules/gitbook-cli/bin/gitbook.js install
+../../node_modules/gitbook-cli/bin/gitbook.js build
+cd ../../
# Generate all version's GitBook output
# For each directory in /docs ...
-cd ./../docs/
+cd ./docs/previous
for D in *; do
if [ -d "${D}" ]; then
@@ -21,12 +36,13 @@ for D in *; do
# Clear previous output, generate new
rm -rf _book
- gitbook install
- gitbook build
+ ../../../node_modules/gitbook-cli/bin/gitbook.js install
+ ../../../node_modules/gitbook-cli/bin/gitbook.js build
cd ..
fi
done
+cd ..
# Move CNAME File into `latest`
cp CNAME ./latest/CNAME
@@ -35,16 +51,18 @@ cp CNAME ./latest/CNAME
mkdir ./latest/_book/history
# Move each version's files to latest's history folder
+cd previous
for D in *; do
if [ -d "${D}" ]; then
echo "Moving ${D} to the latest version's history folder"
- mkdir "./latest/_book/history/${D}"
- cp -v -r "./${D}/_book"/* "./latest/_book/history/${D}"
+ mkdir "../latest/_book/history/${D}"
+ cp -v -r "./${D}/_book"/* "../latest/_book/history/${D}"
fi
done
+cd ..
# Generate Examples
cd ./../examples/
diff --git a/README.md b/README.md
index 88c22ddbb..d4455036e 100755
--- a/README.md
+++ b/README.md
@@ -165,6 +165,7 @@ Thanks goes to these people ([emoji key][emojis]):
| [
Juan Narvaez](https://github.com/jdnarvaez)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=jdnarvaez "Code") | [
Mike](https://github.com/mikehazell)
[📖](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Documentation") [💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Code") [⚠️](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mikehazell "Tests") | [
Sangkeun Kim](http://sisobus.com)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=sisobus "Code") [💬](#question-sisobus "Answering Questions") | [
Victor Saase](https://github.com/vsaase)
[🤔](#ideas-vsaase "Ideas, Planning, & Feedback") | [
Michael Wasser](http://www.mikewasser.com)
[📖](https://github.com/cornerstonejs/cornerstoneTools/commits?author=untoldone "Documentation") | [
Amandeep Singh](https://github.com/singhArmani)
[🖋](#content-singhArmani "Content") | [
Madison Dickson](http://mix3dstudios.com)
[📖](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mix3d "Documentation") |
| [
Kevin Lee Drum](https://github.com/kevinleedrum)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kevinleedrum "Code") | [
Makarand Bauskar](https://github.com/mmbauskar)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=mbauskar "Code") | [
Biharck Araujo](http://www.biharck.com.br)
[💡](#example-biharck "Examples") [📖](https://github.com/cornerstonejs/cornerstoneTools/commits?author=biharck "Documentation") | [
Devon Bernard](https://www.linkedin.com/in/devonbernard)
[📖](https://github.com/cornerstonejs/cornerstoneTools/commits?author=DevonBernard "Documentation") | [
Karl-Heinrich](https://github.com/Karl-Heinrich)
[🐛](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3AKarl-Heinrich "Bug reports") [💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Karl-Heinrich "Code") [⚠️](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Karl-Heinrich "Tests") | [
counterxing](https://blog.xingbofeng.com/)
[🐛](https://github.com/cornerstonejs/cornerstoneTools/issues?q=author%3Axingbofeng "Bug reports") [💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=xingbofeng "Code") | [
Jorge Lopes](https://github.com/jlopes90)
[💬](#question-jlopes90 "Answering Questions") |
| [
Gabriel Garrido](http://garrido.io)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=Ggpsv "Code") | [
ASVBPREAUBV](https://github.com/ASVBPREAUBV)
[📖](https://github.com/cornerstonejs/cornerstoneTools/commits?author=ASVBPREAUBV "Documentation") | [
frolic06](https://github.com/frolic06)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=frolic06 "Code") | [
codepage949](https://github.com/codepage949)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=codepage949 "Code") | [
Asherah Connor](https://kivikakk.ee)
[💻](https://github.com/cornerstonejs/cornerstoneTools/commits?author=kivikakk "Code") |
+
This project follows the [all-contributors][all-contributors] specification.
diff --git a/docs/v2/.nojekyll b/docs/previous/v2/.nojekyll
similarity index 100%
rename from docs/v2/.nojekyll
rename to docs/previous/v2/.nojekyll
diff --git a/docs/v2/README.md b/docs/previous/v2/README.md
similarity index 100%
rename from docs/v2/README.md
rename to docs/previous/v2/README.md
diff --git a/docs/v2/SUMMARY.md b/docs/previous/v2/SUMMARY.md
similarity index 100%
rename from docs/v2/SUMMARY.md
rename to docs/previous/v2/SUMMARY.md
diff --git a/docs/v2/advanced/layered-image-stacks.md b/docs/previous/v2/advanced/layered-image-stacks.md
similarity index 100%
rename from docs/v2/advanced/layered-image-stacks.md
rename to docs/previous/v2/advanced/layered-image-stacks.md
diff --git a/docs/v2/book.json b/docs/previous/v2/book.json
similarity index 100%
rename from docs/v2/book.json
rename to docs/previous/v2/book.json
diff --git a/docs/v2/contributing.md b/docs/previous/v2/contributing.md
similarity index 100%
rename from docs/v2/contributing.md
rename to docs/previous/v2/contributing.md
diff --git a/docs/v2/custom-tools/anatomy-of-a-tool.md b/docs/previous/v2/custom-tools/anatomy-of-a-tool.md
similarity index 100%
rename from docs/v2/custom-tools/anatomy-of-a-tool.md
rename to docs/previous/v2/custom-tools/anatomy-of-a-tool.md
diff --git a/docs/v2/custom-tools/simple-tools.md b/docs/previous/v2/custom-tools/simple-tools.md
similarity index 100%
rename from docs/v2/custom-tools/simple-tools.md
rename to docs/previous/v2/custom-tools/simple-tools.md
diff --git a/docs/v2/essentials/getting-started.md b/docs/previous/v2/essentials/getting-started.md
similarity index 100%
rename from docs/v2/essentials/getting-started.md
rename to docs/previous/v2/essentials/getting-started.md
diff --git a/docs/v2/essentials/image-tools.md b/docs/previous/v2/essentials/image-tools.md
similarity index 100%
rename from docs/v2/essentials/image-tools.md
rename to docs/previous/v2/essentials/image-tools.md
diff --git a/docs/v2/essentials/input-sources.md b/docs/previous/v2/essentials/input-sources.md
similarity index 100%
rename from docs/v2/essentials/input-sources.md
rename to docs/previous/v2/essentials/input-sources.md
diff --git a/docs/v2/essentials/stack-tools.md b/docs/previous/v2/essentials/stack-tools.md
similarity index 100%
rename from docs/v2/essentials/stack-tools.md
rename to docs/previous/v2/essentials/stack-tools.md
diff --git a/docs/v2/essentials/tool-data.md b/docs/previous/v2/essentials/tool-data.md
similarity index 100%
rename from docs/v2/essentials/tool-data.md
rename to docs/previous/v2/essentials/tool-data.md
diff --git a/docs/v2/essentials/tool-states.md b/docs/previous/v2/essentials/tool-states.md
similarity index 100%
rename from docs/v2/essentials/tool-states.md
rename to docs/previous/v2/essentials/tool-states.md
diff --git a/docs/v2/guides/migrating-major-versions.md b/docs/previous/v2/guides/migrating-major-versions.md
similarity index 100%
rename from docs/v2/guides/migrating-major-versions.md
rename to docs/previous/v2/guides/migrating-major-versions.md
diff --git a/docs/v2/installation.md b/docs/previous/v2/installation.md
similarity index 100%
rename from docs/v2/installation.md
rename to docs/previous/v2/installation.md
diff --git a/docs/v3/.nojekyll b/docs/previous/v3/.nojekyll
similarity index 100%
rename from docs/v3/.nojekyll
rename to docs/previous/v3/.nojekyll
diff --git a/docs/v3/README.md b/docs/previous/v3/README.md
similarity index 100%
rename from docs/v3/README.md
rename to docs/previous/v3/README.md
diff --git a/docs/v3/SUMMARY.md b/docs/previous/v3/SUMMARY.md
similarity index 100%
rename from docs/v3/SUMMARY.md
rename to docs/previous/v3/SUMMARY.md
diff --git a/docs/v3/anatomy-of-a-tool/configuration.md b/docs/previous/v3/anatomy-of-a-tool/configuration.md
similarity index 100%
rename from docs/v3/anatomy-of-a-tool/configuration.md
rename to docs/previous/v3/anatomy-of-a-tool/configuration.md
diff --git a/docs/v3/anatomy-of-a-tool/index.md b/docs/previous/v3/anatomy-of-a-tool/index.md
similarity index 100%
rename from docs/v3/anatomy-of-a-tool/index.md
rename to docs/previous/v3/anatomy-of-a-tool/index.md
diff --git a/docs/v3/anatomy-of-a-tool/interaction-types.md b/docs/previous/v3/anatomy-of-a-tool/interaction-types.md
similarity index 100%
rename from docs/v3/anatomy-of-a-tool/interaction-types.md
rename to docs/previous/v3/anatomy-of-a-tool/interaction-types.md
diff --git a/docs/v3/anatomy-of-a-tool/measurement-data.md b/docs/previous/v3/anatomy-of-a-tool/measurement-data.md
similarity index 100%
rename from docs/v3/anatomy-of-a-tool/measurement-data.md
rename to docs/previous/v3/anatomy-of-a-tool/measurement-data.md
diff --git a/docs/v3/anatomy-of-a-tool/mixins.md b/docs/previous/v3/anatomy-of-a-tool/mixins.md
similarity index 100%
rename from docs/v3/anatomy-of-a-tool/mixins.md
rename to docs/previous/v3/anatomy-of-a-tool/mixins.md
diff --git a/docs/v3/anatomy-of-a-tool/modes.md b/docs/previous/v3/anatomy-of-a-tool/modes.md
similarity index 100%
rename from docs/v3/anatomy-of-a-tool/modes.md
rename to docs/previous/v3/anatomy-of-a-tool/modes.md
diff --git a/docs/v3/anatomy-of-a-tool/strategies.md b/docs/previous/v3/anatomy-of-a-tool/strategies.md
similarity index 100%
rename from docs/v3/anatomy-of-a-tool/strategies.md
rename to docs/previous/v3/anatomy-of-a-tool/strategies.md
diff --git a/docs/v3/android-chrome-192x192.png b/docs/previous/v3/android-chrome-192x192.png
similarity index 100%
rename from docs/v3/android-chrome-192x192.png
rename to docs/previous/v3/android-chrome-192x192.png
diff --git a/docs/v3/android-chrome-256x256.png b/docs/previous/v3/android-chrome-256x256.png
similarity index 100%
rename from docs/v3/android-chrome-256x256.png
rename to docs/previous/v3/android-chrome-256x256.png
diff --git a/docs/v3/apple-touch-icon.png b/docs/previous/v3/apple-touch-icon.png
similarity index 100%
rename from docs/v3/apple-touch-icon.png
rename to docs/previous/v3/apple-touch-icon.png
diff --git a/docs/v3/book.json b/docs/previous/v3/book.json
similarity index 100%
rename from docs/v3/book.json
rename to docs/previous/v3/book.json
diff --git a/docs/v3/browserconfig.xml b/docs/previous/v3/browserconfig.xml
similarity index 100%
rename from docs/v3/browserconfig.xml
rename to docs/previous/v3/browserconfig.xml
diff --git a/docs/v3/contributing.md b/docs/previous/v3/contributing.md
similarity index 100%
rename from docs/v3/contributing.md
rename to docs/previous/v3/contributing.md
diff --git a/docs/v3/custom-tools/adding-mixins.md b/docs/previous/v3/custom-tools/adding-mixins.md
similarity index 100%
rename from docs/v3/custom-tools/adding-mixins.md
rename to docs/previous/v3/custom-tools/adding-mixins.md
diff --git a/docs/v3/custom-tools/choosing-a-base-class.md b/docs/previous/v3/custom-tools/choosing-a-base-class.md
similarity index 100%
rename from docs/v3/custom-tools/choosing-a-base-class.md
rename to docs/previous/v3/custom-tools/choosing-a-base-class.md
diff --git a/docs/v3/custom-tools/creating-your-tool.md b/docs/previous/v3/custom-tools/creating-your-tool.md
similarity index 100%
rename from docs/v3/custom-tools/creating-your-tool.md
rename to docs/previous/v3/custom-tools/creating-your-tool.md
diff --git a/docs/v3/custom-tools/event-dispatcher-callbacks.md b/docs/previous/v3/custom-tools/event-dispatcher-callbacks.md
similarity index 100%
rename from docs/v3/custom-tools/event-dispatcher-callbacks.md
rename to docs/previous/v3/custom-tools/event-dispatcher-callbacks.md
diff --git a/docs/v3/custom-tools/index.md b/docs/previous/v3/custom-tools/index.md
similarity index 100%
rename from docs/v3/custom-tools/index.md
rename to docs/previous/v3/custom-tools/index.md
diff --git a/docs/v3/custom-tools/mode-change-callbacks.md b/docs/previous/v3/custom-tools/mode-change-callbacks.md
similarity index 100%
rename from docs/v3/custom-tools/mode-change-callbacks.md
rename to docs/previous/v3/custom-tools/mode-change-callbacks.md
diff --git a/docs/v3/debugging/index.md b/docs/previous/v3/debugging/index.md
similarity index 100%
rename from docs/v3/debugging/index.md
rename to docs/previous/v3/debugging/index.md
diff --git a/docs/v3/favicon-16x16.png b/docs/previous/v3/favicon-16x16.png
similarity index 100%
rename from docs/v3/favicon-16x16.png
rename to docs/previous/v3/favicon-16x16.png
diff --git a/docs/v3/favicon-32x32.png b/docs/previous/v3/favicon-32x32.png
similarity index 100%
rename from docs/v3/favicon-32x32.png
rename to docs/previous/v3/favicon-32x32.png
diff --git a/docs/v3/favicon.ico b/docs/previous/v3/favicon.ico
similarity index 100%
rename from docs/v3/favicon.ico
rename to docs/previous/v3/favicon.ico
diff --git a/docs/v3/guides/migrating-major-versions.md b/docs/previous/v3/guides/migrating-major-versions.md
similarity index 100%
rename from docs/v3/guides/migrating-major-versions.md
rename to docs/previous/v3/guides/migrating-major-versions.md
diff --git a/docs/v3/horizontal-logo.png b/docs/previous/v3/horizontal-logo.png
similarity index 100%
rename from docs/v3/horizontal-logo.png
rename to docs/previous/v3/horizontal-logo.png
diff --git a/docs/v3/index.md b/docs/previous/v3/index.md
similarity index 100%
rename from docs/v3/index.md
rename to docs/previous/v3/index.md
diff --git a/docs/v3/installation.md b/docs/previous/v3/installation.md
similarity index 100%
rename from docs/v3/installation.md
rename to docs/previous/v3/installation.md
diff --git a/docs/v3/migration/index.md b/docs/previous/v3/migration/index.md
similarity index 100%
rename from docs/v3/migration/index.md
rename to docs/previous/v3/migration/index.md
diff --git a/docs/v3/mstile-150x150.png b/docs/previous/v3/mstile-150x150.png
similarity index 100%
rename from docs/v3/mstile-150x150.png
rename to docs/previous/v3/mstile-150x150.png
diff --git a/docs/v3/package-lock.json b/docs/previous/v3/package-lock.json
similarity index 100%
rename from docs/v3/package-lock.json
rename to docs/previous/v3/package-lock.json
diff --git a/docs/v3/partials/example-warning.md b/docs/previous/v3/partials/example-warning.md
similarity index 100%
rename from docs/v3/partials/example-warning.md
rename to docs/previous/v3/partials/example-warning.md
diff --git a/docs/v3/safari-pinned-tab.svg b/docs/previous/v3/safari-pinned-tab.svg
similarity index 100%
rename from docs/v3/safari-pinned-tab.svg
rename to docs/previous/v3/safari-pinned-tab.svg
diff --git a/docs/v3/site.webmanifest b/docs/previous/v3/site.webmanifest
similarity index 100%
rename from docs/v3/site.webmanifest
rename to docs/previous/v3/site.webmanifest
diff --git a/docs/v3/styles/website.css b/docs/previous/v3/styles/website.css
similarity index 100%
rename from docs/v3/styles/website.css
rename to docs/previous/v3/styles/website.css
diff --git a/docs/v3/third-party-functionality/imports.md b/docs/previous/v3/third-party-functionality/imports.md
similarity index 100%
rename from docs/v3/third-party-functionality/imports.md
rename to docs/previous/v3/third-party-functionality/imports.md
diff --git a/docs/v3/third-party-functionality/index.md b/docs/previous/v3/third-party-functionality/index.md
similarity index 100%
rename from docs/v3/third-party-functionality/index.md
rename to docs/previous/v3/third-party-functionality/index.md
diff --git a/docs/v3/third-party-functionality/item-types.md b/docs/previous/v3/third-party-functionality/item-types.md
similarity index 100%
rename from docs/v3/third-party-functionality/item-types.md
rename to docs/previous/v3/third-party-functionality/item-types.md
diff --git a/docs/v3/third-party-functionality/registration.md b/docs/previous/v3/third-party-functionality/registration.md
similarity index 100%
rename from docs/v3/third-party-functionality/registration.md
rename to docs/previous/v3/third-party-functionality/registration.md
diff --git a/docs/v3/third-party-functionality/tools.md b/docs/previous/v3/third-party-functionality/tools.md
similarity index 100%
rename from docs/v3/third-party-functionality/tools.md
rename to docs/previous/v3/third-party-functionality/tools.md
diff --git a/docs/v3/tool-mixins/binary-tools.md b/docs/previous/v3/tool-mixins/binary-tools.md
similarity index 100%
rename from docs/v3/tool-mixins/binary-tools.md
rename to docs/previous/v3/tool-mixins/binary-tools.md
diff --git a/docs/v3/tool-mixins/index.md b/docs/previous/v3/tool-mixins/index.md
similarity index 100%
rename from docs/v3/tool-mixins/index.md
rename to docs/previous/v3/tool-mixins/index.md
diff --git a/docs/v3/tool-types/base-annotation-tool.md b/docs/previous/v3/tool-types/base-annotation-tool.md
similarity index 100%
rename from docs/v3/tool-types/base-annotation-tool.md
rename to docs/previous/v3/tool-types/base-annotation-tool.md
diff --git a/docs/v3/tool-types/base-brush-tool.md b/docs/previous/v3/tool-types/base-brush-tool.md
similarity index 100%
rename from docs/v3/tool-types/base-brush-tool.md
rename to docs/previous/v3/tool-types/base-brush-tool.md
diff --git a/docs/v3/tool-types/base-segmentation-tool.md b/docs/previous/v3/tool-types/base-segmentation-tool.md
similarity index 100%
rename from docs/v3/tool-types/base-segmentation-tool.md
rename to docs/previous/v3/tool-types/base-segmentation-tool.md
diff --git a/docs/v3/tool-types/base-tool.md b/docs/previous/v3/tool-types/base-tool.md
similarity index 100%
rename from docs/v3/tool-types/base-tool.md
rename to docs/previous/v3/tool-types/base-tool.md
diff --git a/docs/v3/tool-types/index.md b/docs/previous/v3/tool-types/index.md
similarity index 100%
rename from docs/v3/tool-types/index.md
rename to docs/previous/v3/tool-types/index.md