Skip to content
Snippets Groups Projects
Verified Commit 67d132a9 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: documentation

parent 98e6ebd7
No related branches found
No related tags found
No related merge requests found
...@@ -25,6 +25,14 @@ tasks: ...@@ -25,6 +25,14 @@ tasks:
cmds: cmds:
- build-doc - build-doc
publish-doc:
silent: true
desc: Publish the documentation to dist/doc
aliases:
- bpd
cmds:
- publish-doc
run-tests: run-tests:
silent: true silent: true
desc: Run the tests desc: Run the tests
......
...@@ -201,7 +201,7 @@ ${pkgs.gnused}/bin/sed -i -E "s_(\"[0-9]+\.[0-9]+\.[0-9]+\")_\"''${VERSION}\"_g" ...@@ -201,7 +201,7 @@ ${pkgs.gnused}/bin/sed -i -E "s_(\"[0-9]+\.[0-9]+\.[0-9]+\")_\"''${VERSION}\"_g"
''; '';
scripts.create-polifill.exec = '' scripts.create-polyfill.exec = ''
TMPFILE=${config.devenv.root}/.devenv/monster.js TMPFILE=${config.devenv.root}/.devenv/monster.js
touch $TMPFILE touch $TMPFILE
...@@ -239,7 +239,7 @@ VERSION=$(cat "${config.devenv.root}/package.json" | jq -r '.version') ...@@ -239,7 +239,7 @@ VERSION=$(cat "${config.devenv.root}/package.json" | jq -r '.version')
update-versions update-versions
build-monster-mjs build-monster-mjs
create-polifill create-polyfill
find ''${TEST_CASES_PATH} -type f | sed "s|^$TEST_CASES_PATH||" > ''${TEST_PATH}web/import.js find ''${TEST_CASES_PATH} -type f | sed "s|^$TEST_CASES_PATH||" > ''${TEST_PATH}web/import.js
...@@ -281,24 +281,11 @@ if [ "$profileExists" -eq "0" ]; then ...@@ -281,24 +281,11 @@ if [ "$profileExists" -eq "0" ]; then
exit 1 exit 1
fi fi
if [ -d ${config.devenv.root}/dist/doc ]; then
rm -rf ${config.devenv.root}/dist/doc
fi
build-doc
code=$?
if [ "$code" -ne "0" ]; then
echo -e "''${RED}✖ Generate doc failed.''${RESET}"
exit 1
fi
echo -e "''${GREEN}✔ Generate doc successful.''${RESET}"
if [ ! -d ${config.devenv.root}/dist/doc ]; then if [ ! -d ${config.devenv.root}/dist/doc ]; then
echo -e "''${RED}✖ No doc found.''${RESET}" echo -e "''${RED}✖ No doc found.''${RESET}"
exit 1 exit 1
fi fi
${pkgs.awscli2}/bin/aws --profile=shopcloud s3 --recursive --only-show-errors cp ${config.devenv.root}/dist/doc/ s3://monsterjs.org/en/api/ ${pkgs.awscli2}/bin/aws --profile=shopcloud s3 --recursive --only-show-errors cp ${config.devenv.root}/dist/doc/ s3://monsterjs.org/en/api/
code=$? code=$?
...@@ -314,7 +301,12 @@ echo -e "''${GREEN}✔ Upload successful.''${RESET}" ...@@ -314,7 +301,12 @@ echo -e "''${GREEN}✔ Upload successful.''${RESET}"
rm -rf ${config.devenv.root}/dist/doc rm -rf ${config.devenv.root}/dist/doc
update-versions update-versions
create-polifill create-polyfill
if [ -d ${config.devenv.root}/dist/doc ]; then
rm -rf ${config.devenv.root}/dist/doc
mkdir -p ${config.devenv.root}/dist/doc
fi
${config.devenv.root}/node_modules/.bin/jsdoc -c ${config.devenv.root}/doc/jsdoc.json ${config.devenv.root}/node_modules/.bin/jsdoc -c ${config.devenv.root}/doc/jsdoc.json
${pkgs.nodejs_20}/bin/node ${config.devenv.root}/opt/scripts/replace-skypack.cjs ${config.devenv.root} ${pkgs.nodejs_20}/bin/node ${config.devenv.root}/opt/scripts/replace-skypack.cjs ${config.devenv.root}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment