diff options
feat: make life easy for moz staff
| -rw-r--r-- | Makefile | 18 | ||||
| -rwxr-xr-x | bootstrap | 20 | 
2 files changed, 38 insertions, 0 deletions
| @@ -1,5 +1,23 @@  all: build pack +# Make alias to simplify building for Mozilla staff when reviewing extensions +mozaddons: +	$(MAKE) deepclean +	$(MAKE) bootstrap +	pnpm i +	$(MAKE) build +	$(MAKE) pack + +clean: +	rm -rf build static/generated .svelte-kit artifacts +deepclean: clean +	rm -rf node_modules +	rm static/manifest.json || true +	ln -s ../manifest.json static/manifest.json + +bootstrap: +	./bootstrap +  build:  	pnpm build diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..dcf11f6 --- /dev/null +++ b/bootstrap @@ -0,0 +1,20 @@ +#!/usr/bin/env zsh +set -eax +if ! which mkdir >/dev/null 2>/dev/null; then +  echo -e "\x1b[0;31mSanity Check - \`mkdir\` - not found. Your busybox||toybox||coreutils||bsdutils||etc is fucked.\x1b[0m" +  exit 2; +fi +if ! which pnpm >/dev/null 2>/dev/null; then +  echo -e "\x1b[0;31mInstall pnpm - https://pnpm.io - ideally using your preferred package manager.\x1b[0m" +  exit 3; +fi +if ! which node >/dev/null 2>/dev/null; then +  echo -e "\x1b[0;31mInstall node - https://nodejs.org - ideally using your preferred package manager.\x1b[0m" +  exit 3; +fi +if ! which jq >/dev/null 2>/dev/null; then +  echo -e "\x1b[0;31mInstall jq, ideally using your preferred package manager.\x1b[0m" +  exit 3; +fi + +pnpm i |