@@ -110,9 +110,9 @@ jobs:
110110 exit 0
111111 fi
112112 rm -rf ./bin/cli
113- rm test/test.cli.js
114- rm etc/cli_opts.json
115- rm docs/usage.txt
113+ rm -f test/test.cli.js
114+ rm -f etc/cli_opts.json
115+ rm -f docs/usage.txt
116116
117117 # For all dependencies, check in all *.js files if they are still used; if not, remove them:
118118 jq -r '.dependencies | keys[]' ./package.json | while read -r dep; do
@@ -149,6 +149,12 @@ jobs:
149149 # Add link definition for CLI package to README.md:
150150 find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe "s/<section class=\"links\">/<section class=\"links\">\n\n[$escapedPkg]: https:\/\/www.npmjs.com\/package\/$escapedPkg/"
151151
152+ # Replace GitHub MathJax equations with SVGs:
153+ - name : ' Replace GitHub MathJax equations with SVGs'
154+ run : |
155+ find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/```math\n([\s\S]+?)\n```\n\n//g'
156+ find . -type f -name '*.md' -print0 | xargs -0 perl -0777 -i -pe 's/<!-- <div class="equation"(.*)(<\/div>\s*-->)/<div class="equation"$1<\/div>/sg'
157+
152158 # Replace GitHub links to individual packages with npm links:
153159 - name : ' Replace all GitHub links to individual packages with npm links'
154160 run : |
@@ -162,8 +168,8 @@ jobs:
162168 # Remove unnecessary files:
163169 - name : ' Remove unnecessary files'
164170 run : |
165- rm docs/repl.txt
166- rm docs/types/test.ts
171+ rm -f docs/repl.txt
172+ rm -f docs/types/test.ts
167173
168174 # Replace all stdlib GitHub dependencies with the respective npm packages:
169175 - name : ' Replace all stdlib GitHub dependencies with the respective npm packages'
@@ -191,7 +197,7 @@ jobs:
191197
192198 # Publish package to npm:
193199 - name : ' Publish package to npm'
194- uses : JS-DevTools/npm-publish@v1
200+ uses : JS-DevTools/npm-publish@v2
195201 with :
196202 token : ${{ secrets.NPM_TOKEN }}
197203 access : public
0 commit comments