sheetjs-clone/modules/Makefile

30 lines
783 B
Makefile
Raw Normal View History

LIBFILES=src/types.ts
#LIBFILES=$(wildcard src/*.ts)
2022-01-29 02:29:34 +00:00
TSFILES=$(wildcard *.ts)
ENTRIES=$(subst .ts,.js,$(TSFILES))
BAREJS=04_base64.js 51_xlsxmeta.js 51_xlsbmeta.js 59_vba.js 64_ftab.js 83_numbers.js
2022-01-29 02:29:34 +00:00
.PHONY: all
all: $(ENTRIES) xlsx.zahl.js
xlsx.zahl.js: test.numbers reframe.node.js
bash -c ./reframe.sh
2022-01-29 02:29:34 +00:00
$(BAREJS): %.js: %.ts $(LIBFILES)
2022-02-04 20:57:47 +00:00
npx esbuild $< --outfile=$@ --platform=browser --target=es5
%.node.js: %.node.ts $(LIBFILES) src/numbers.ts
npx esbuild $< --bundle --external:xlsx --outfile=$@ --platform=node
2022-01-29 02:29:34 +00:00
sed -i '' 's/ts-node/node/g' $@
%.js: %.ts $(LIBFILES)
npx esbuild $< --bundle --outfile=$@ --platform=browser --format=iife --global-name=$* --target=es5
2022-03-21 01:39:16 +00:00
src/numbers.ts: 83_numbers.ts
cat $< | sed 's/^\/\/<<//g' > $@
2022-01-29 02:29:34 +00:00
.PHONY: clean
clean:
rm $(ENTRIES)