diff --git a/Makefile b/Makefile index 763d98f..8fcc3cb 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ requirements \ quarto-exts \ site serve \ - static-components \ + components components-shinylive components-static \ clean clean-extensions clean-venv distclean .DEFAULT_GOAL := help @@ -13,7 +13,7 @@ PYBIN = $(VENV)/bin ## Build everything -all: deps quartodoc static-components site +all: deps quartodoc components-static site # Any targets that depend on $(VENV) or $(PYBIN) will cause the venv to be # created. To use the ven, python scripts should run with the prefix $(PYBIN), @@ -107,6 +107,12 @@ clean-venv: ## Remove all build files (Quarto website, quarto extensions, venv) distclean: clean clean-extensions clean-venv -static-components: +components-static: rm -rf components/static . $(PYBIN)/activate && python components/make-static-previews.py + +components-shinylive-links: + . $(PYBIN)/activate && python components/update-shinylive-links.py + +## Build component static previews and update shinylive links +components: components-shinylive-links components-static diff --git a/README.md b/README.md index 2c18ee1..5cb7f83 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,12 @@ Build the site: make site ``` +To update shinylive links in `components/` and build static versions of the components in the gallery, run: + +```bash +make components +``` + ### Virtualenv When running `make`, all of the Python scripts and commands run in a virtualenv. If you want to run commands at the terminal in the same virtualenv, you will need to do the following: