-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
26 lines (21 loc) · 892 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
LIBRARY_DIR=$(PWD)/reactable
REACTABLE_DIR=tmp/reactable
all: react_tables/static/reactable-py.esm.js
setup:
mkdir -p tmp/reactable
git clone https://github.com/machow/reactable.git tmp/reactable
docs-build:
cd docs \
&& quartodoc build --verbose \
&& quarto render
docs-reference:
quartodoc build --config docs/_quarto.yml
reactable/static/reactable-py.esm.%:
cd tmp/reactable
npx esbuild \
$(REACTABLE_DIR)/srcjs/index2.js \
--bundle --outfile=$(LIBRARY_DIR)/static/reactable-py.esm.js --format=esm \
--external:react --external:react-dom --target=esnext \
--loader:.js=jsx \
--global-name=Reactable \
--banner:js='import * as requireReact from "react"; import * as requireReactDom from "react-dom"; function require(m) { if (m === "react") return requireReact; if (m === "react-dom") return requireReactDom; throw new Error("Unknown module" + m); }'