Skip to content

Commit d5f2333

Browse files
committed
ESM build
1 parent 6d1f7cc commit d5f2333

File tree

4 files changed

+2052
-1
lines changed

4 files changed

+2052
-1
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ TARGET=cptable.js
55
AUXTARGETS=cputils.js cpexcel.js sbcs.js
66
DISTFULL_A=cpexcel sbcs
77
DISTFULL_B=cptable
8+
DISTFULL_M=cpexcel
89
CMDS=
910
#DISTBITS=iso2022.js
1011
DISTBITS=
@@ -28,6 +29,7 @@ js: make.sh codepage.md ## Build all output targets
2829
bash make.sh <(awk -F, '$$3=="1"' pages.csv) sbcs.js cptable
2930
bash make.sh excel.csv cpexcel.js cptable
3031
bash make.sh pages.csv cptable.js cptable
32+
bash make_esm.sh excel.csv cpexcel.mjs
3133
#node iso2022/make_iso2022.njs > iso2022.js
3234
make cputils.js
3335

@@ -43,12 +45,13 @@ dist: $(TARGET) $(AUXTARGETS) ## Copy files for distribution
4345
cp $(TARGET) $(AUXTARGETS) LICENSE dist/
4446
for i in $(DISTFULL_A); do cat $$i.js cputils.js | sed "s#require('./cptable')#cptable#" > dist/$$i.full.js; done
4547
for i in $(DISTFULL_B); do cat $$i.js $(DISTBITS) cputils.js | sed "s#require('./cptable')#cptable#" > dist/$$i.full.js; done
48+
for i in $(DISTFULL_M); do cat $$i.mjs cputils.mjs | sed "s#require('./cptable')#cptable#" > dist/$$i.full.mjs; done
4649

4750
## Testing
4851

4952
.PHONY: test mocha
5053
test mocha: $(TARGET) baseline ## Run test suite
51-
mocha -R spec -t 20000
54+
./node_modules/.bin/mocha -R spec -t 20000
5255

5356
.PHONY: ctest
5457
ctest: ## Build browser test (into ctest/ subdirectory)

0 commit comments

Comments
 (0)