From 413e77e2aedc6a55afe5df98c8fbe90b66f59ab9 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Fri, 10 Mar 2023 10:07:47 +0700 Subject: [PATCH] fix(common): Start adjusting parameters --- resources/build/build-help.inc.sh | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/resources/build/build-help.inc.sh b/resources/build/build-help.inc.sh index 8d07028cb5..a0e5ea9be0 100644 --- a/resources/build/build-help.inc.sh +++ b/resources/build/build-help.inc.sh @@ -1,11 +1,18 @@ #!/usr/bin/env bash # -# This script contains utilities for converting markdown help documentation to htm/html +# This script contains utilities for converting markdown help documentation to htm/html. +# The apps can then include the htm/html files in the installation to display +# help within the app. # Expected platforms: android, ios, mac # Note: linux app doesn't need to convert from markdown to html # -# Clean the htm/html files and recreate the output folder +# Clean the htm/html files and recreate the output path +# ### Parameters +# +# * `platform` the platform to build, matching the platform folder name +# * `output_path` path to emit files to, relative to `$KEYMAN_ROOT/$platform` +# function _build_help_clean() { echo "Cleaning" if [[ "$1" == "android" ]]; then @@ -24,6 +31,10 @@ function _build_help_clean() { # # Compile all .md to .html +# ### Parameters +# +# * `platform` the platform to build, matching the platform folder name +# * `output_path` path to emit files to, relative to `$KEYMAN_ROOT/$platform` # function _build_help_build() { MDLUA="$KEYMAN_ROOT/resources/build/html-link.lua" @@ -63,24 +74,24 @@ function _build_help_build() { # Builds .html files from .md source # # ### Usage -# +# # ```bash # build_help_html platform output_path # ``` -# +# # ### Parameters -# +# # * `platform` the platform to build, matching the platform folder name # * `output_path` path to emit files to, relative to `$KEYMAN_ROOT/$platform` -# +# # ### Description -# +# # Expects to find .md source under $KEYMAN_ROOT/$platform/help/, and # will write the output .html to $KEYMAN_ROOT/$platform/$output_path. # function build_help_html() { pushd $(pwd) - _build_help_clean $1 - _build_help_build $1 + _build_help_clean $1 $2 + _build_help_build $1 $2 popd }