From 03a9a8774c6e4f22550e36cfce637e0b40f94954 Mon Sep 17 00:00:00 2001 From: Spocke Date: Tue, 14 Aug 2018 10:58:07 +0200 Subject: [PATCH] fixed local api reference and updated readme.md --- README.md | 7 +++++++ _scripts/api-reference-local.sh | 10 ++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea07e33..cbfa710 100644 --- a/README.md +++ b/README.md @@ -59,3 +59,10 @@ including information on troubleshooting the "first time set up" process. ## Why is HTML minification disabled? It's very slow and the minifier is using regex to parse HTML. We may add a different minifier in the future. + +## Generating api docs from local files + +``` +npm i -g ephox/moxiedoc#feature/tinymcenext +./_scripts/api-reference-local.sh ../tinymce +``` diff --git a/_scripts/api-reference-local.sh b/_scripts/api-reference-local.sh index 709301e..f9dfa14 100755 --- a/_scripts/api-reference-local.sh +++ b/_scripts/api-reference-local.sh @@ -2,13 +2,19 @@ set -e +if [[ $1 -eq 0 ]] ; then + echo 'You need to specify the root tinymce directory to generate the source for' + echo './_scripts/api-reference-local ../tinymce' + exit 1 +fi + API_TMPDIR="/tmp/tinymce-$API_VERSION" -echo -e "\n > importing data files for tinymce api reference: local\n" +echo -e "\n > importing data files for tinymce api reference: local from $1\n" rm -rf "$API_TMPDIR" mkdir "$API_TMPDIR" -moxiedoc "../tinymce-stash/src/core/src/main/js" -t tinymcenext -o "$API_TMPDIR/tinymce-api-reference.zip" +moxiedoc "$1/src/core/main/ts" -t tinymcenext -o "$API_TMPDIR/tinymce-api-reference.zip" unzip -o "$API_TMPDIR/tinymce-api-reference.zip" rm _data/nav_api.json