Skip to content

Commit

Permalink
begin work to make web tests language agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Aug 4, 2024
1 parent e10f023 commit 3306479
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ rust/target
**/.coverage.*
**/coverage
**/dist/*
docs/_static/test-js.html
docs/_static/test-*.html
javascript/src/lib/fallbacks
38 changes: 34 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,52 @@ help:
.PHONY: help Makefile

clean:
rm -r _build _static/index.html _static/dist || echo
rm -r _build _static/test-*.html _static/dist || echo

dependencies:
$(PIP) install -r requirements.txt -r ../c/requirements.txt -r ../python/requirements.txt --upgrade $(USER_FLAG) $(PROXY_ARG)
npm install -g jsdoc

_static/index.html: Makefile
_static/test-c.html:
cd ../c && $(MAKE) webpack $(MFLAGS)
mkdir -p _static/dist
cp ../c/dist/bundle-c.js _static/dist/bundle-c.js
cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-c.js > _static/test-c.html

_static/test-cp.html:
cd ../cplusplus && $(MAKE) webpack $(MFLAGS)
mkdir -p _static/dist
cp ../cplusplus/dist/bundle-cp.js _static/dist/bundle-cp.js
cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-cp.js > _static/test-cp.html

_static/test-cs.html:
cd ../csharp && $(MAKE) webpack $(MFLAGS)
mkdir -p _static/dist
cp ../csharp/dist/bundle-cs.js _static/dist/bundle-cs.js
cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-cs.js > _static/test-cs.html

_static/test-js.html:
cd ../javascript && $(MAKE) webpack $(MFLAGS)
mkdir -p _static/dist
cp ../javascript/dist/bundle-js.js _static/dist/bundle-js.js
cp ../javascript/index.html _static/test-js.html

html: Makefile _static/index.html
_static/test-py.html:
cd ../python && $(MAKE) webpack $(MFLAGS)
mkdir -p _static/dist
cp ../javascript/dist/bundle-py.js _static/dist/bundle-py.js
cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-py.js > _static/test-py.html

_static/test-rs.html:
cd ../rust && $(MAKE) webpack $(MFLAGS)
mkdir -p _static/dist
cp ../rust/dist/bundle-rs.js _static/dist/bundle-rs.js
cat ../javascript/index.html | sed s#_static/bundle-js.js#_static/bundle-rs.js > _static/test-rs.html

html: _static/test-js.html
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
%:
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

0 comments on commit 3306479

Please sign in to comment.