2022-03-22 20:08:08 +00:00
|
|
|
LIBFILES=src/types.ts
|
|
|
|
#LIBFILES=$(wildcard src/*.ts)
|
2022-01-29 02:29:34 +00:00
|
|
|
TSFILES=$(wildcard *.ts)
|
|
|
|
ENTRIES=$(subst .ts,.js,$(TSFILES))
|
2022-09-20 05:31:53 +00:00
|
|
|
CC=esbuild@0.14.14
|
2022-01-29 02:29:34 +00:00
|
|
|
|
2022-07-08 22:31:08 +00:00
|
|
|
BAREJS=04_base64.js 45_rtf.js 51_xlsxmeta.js 51_xlsbmeta.js 59_vba.js 64_ftab.js 83_numbers.js
|
2022-02-05 13:59:25 +00:00
|
|
|
|
2022-01-29 02:29:34 +00:00
|
|
|
.PHONY: all
|
2022-03-24 13:59:49 +00:00
|
|
|
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
|
|
|
|
2022-02-05 13:59:25 +00:00
|
|
|
$(BAREJS): %.js: %.ts $(LIBFILES)
|
2022-09-20 05:31:53 +00:00
|
|
|
npx $(CC) $< --outfile=$@ --platform=browser --target=es5
|
2022-02-04 20:57:47 +00:00
|
|
|
|
2022-03-22 20:08:08 +00:00
|
|
|
%.node.js: %.node.ts $(LIBFILES) src/numbers.ts
|
2022-09-20 05:31:53 +00:00
|
|
|
npx $(CC) $< --bundle --external:xlsx --outfile=$@ --platform=node
|
2022-05-17 01:26:22 +00:00
|
|
|
sed -i '' 's/ts-node/node/g' $@ || sed -i'' 's/ts-node/node/g' $@ || { echo "sed failed"; exit 1; }
|
2022-01-29 02:29:34 +00:00
|
|
|
|
|
|
|
%.js: %.ts $(LIBFILES)
|
2022-09-20 05:31:53 +00:00
|
|
|
npx $(CC) $< --bundle --outfile=$@ --platform=browser --format=iife --global-name=$* --target=es5
|
2022-01-29 02:29:34 +00:00
|
|
|
|
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)
|