sheetjs_sheetjs/modules/Makefile

38 lines
991 B
Makefile
Raw Permalink 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))
CC=esbuild@0.14.14
2022-01-29 02:29:34 +00:00
2023-04-14 07:51:02 +00:00
BAREJS=04_base64.js 32_odmanrdf.js 45_rtf.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
2022-09-21 22:16:57 +00:00
all: bits xlsx.zahl.js
2023-04-14 07:51:02 +00:00
.PHONY: lint
lint: $(filter-out $(wildcard *.node.ts),$(TSFILES))
tsc --strict --noEmit $^
2022-09-21 22:16:57 +00:00
.PHONY: bits
bits: $(ENTRIES)
xlsx.zahl.js: test.numbers
bash -c ./reframe.sh
2022-01-29 02:29:34 +00:00
$(BAREJS): %.js: %.ts $(LIBFILES)
npx $(CC) $< --outfile=$@ --platform=browser --target=es5
2022-02-04 20:57:47 +00:00
%.node.js: %.node.ts $(LIBFILES) src/numbers.ts
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)
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)