This means that emcc automatically uses the correct mode, and seems
slightly more correct to me.
.PHONY: all-web
all-web: all sample.png extended.png icon-16.png icon-32.png icon-64.png \
- bedstead.js
+ bedstead.mjs
.PHONY: experimental
experimental: bedstead-chiseltip.otf bedstead-plotter-thin.otf \
bedstead-complement.pdf: bedstead-complement.ps bedstead.otf Fontmap
ps2pdf -P $< $@
-EMCCFLAGS = -O2 -sEXPORT_ES6 -sEXIT_RUNTIME -sSTRICT \
+EMCCFLAGS = -O2 -sEXIT_RUNTIME -sSTRICT \
-sINCOMING_MODULE_JS_API='["arguments","print"]'
EMCCFLAGS += $(CWARNFLAGS)
-%.js: %.c
+%.mjs: %.c
emcc $(EMCCFLAGS) -o $@ $<
.PHONY: clean
clean:
- rm -f bedstead *.ttx *.otf *.bdf *.bdf.ps *.png *.pdf *.js *.wasm \
+ rm -f bedstead *.ttx *.otf *.bdf *.bdf.ps *.png *.pdf *.mjs *.wasm \
bedstead-complement.ps
.PHONY: install-user
document.querySelector('#drawing').onclick = drawing_click;
update_glyph(true);
}
- import("./bedstead.js").then((module) => {
+ import("./bedstead.mjs").then((module) => {
Bedstead = module.default;
// This script is loaded asynchronously, so make sure the DOM is
// loaded before touching it.