From 1c31a2e7cb2d7b8fc997ecace6c0c12ec0c34538 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Wed, 25 Sep 2024 12:39:37 +0200 Subject: [PATCH] build: API Reference generation procedure simplified --- .github/workflows/documentation.yml | 7 ++----- .gitpod/Dockerfile | 7 ++----- CONTRIBUTING.md | 11 +++++------ 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index a215d06b..029adf59 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -55,12 +55,9 @@ jobs: run: | sudo apt install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern sudo apt install haskell-stack graphviz nodejs npm ghc cabal-install - npm install split mathjax-full mathjax-node-sre + npm install split mathjax-full mathjax-node-sre mathjax-node-cli cabal update - - name: Installing MathJax-Node-CLI - run: | - git clone https://github.com/mathjax/mathjax-node-cli --depth=1 - echo "${{ github.workspace }}/mathjax-node-cli/bin" >> $GITHUB_PATH + echo "~/node_modules/.bin" >> $GITHUB_PATH - name: Get git repos with API reference tools run: | git clone https://github.com/JohelEGP/jegp.cmake_modules.git --depth=1 diff --git a/.gitpod/Dockerfile b/.gitpod/Dockerfile index 5c487083..e9b0a6dd 100644 --- a/.gitpod/Dockerfile +++ b/.gitpod/Dockerfile @@ -32,9 +32,6 @@ RUN sudo install-packages \ npm \ ghc \ cabal-install -RUN npm install split mathjax-full mathjax-node-sre +RUN npm install split mathjax-full mathjax-node-sre mathjax-node-cli RUN cabal update - -# Install MathJax-Node-CLI -RUN git clone https://github.com/mathjax/mathjax-node-cli --depth=1 -RUN echo "export PATH=\"$PWD/mathjax-node-cli/bin:\$PATH\"" >> ~/.bashrc +RUN echo "export PATH=\"~/node_modules/.bin:\$PATH\"" >> ~/.bashrc diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 47210ac2..f3aeb1d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -190,17 +190,16 @@ directory: ```bash sudo apt install latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended lmodern sudo apt install haskell-stack graphviz nodejs npm ghc cabal-install -npm install split mathjax-full mathjax-node-sre +npm install split mathjax-full mathjax-node-sre mathjax-node-cli cabal update ``` -Also, installing `mathjax-node-cli` through npm does not help because `tex2html` is not called within -node.js. This is why we need to download `mathjax-node-cli` and add its `bin` folder to the `PATH` -environment variable: +On some platforms, installing `mathjax-node-cli` through `npm` does update the system's `PATH` +environment variable resulting in `tex2html` not found errors. In such cases we need to add +the `.bin` folder to the `PATH` environment variable manually: ```bash -git clone https://github.com/mathjax/mathjax-node-cli -echo "export PATH=\"$PWD/mathjax-node-cli/bin:\$PATH\"" >> ~/.bashrc && source ~/.bashrc +echo "export PATH=\"~/node_modules/.bin:\$PATH\"" >> ~/.bashrc && source ~/.bashrc ``` Next, we need to clone the following git repositories: