Skip to content

Commit 1b0af0f

Browse files
committed
fix: use cjs
1 parent 32c10e9 commit 1b0af0f

12 files changed

+4834
-122
lines changed

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ BUILD_DIR_EXISTS = $(BUILD_DIR)/.exists--used_by_Makefile
104104
#
105105

106106
.PHONY: all basic dev js uglify css font clean
107-
all: font css uglify es
107+
all: font css uglify cjs
108108
basic: $(UGLY_BASIC_JS) $(BASIC_CSS)
109109
# dev is like all, but without minification
110110
dev: font css js
@@ -116,10 +116,10 @@ font: $(FONT_TARGET)
116116
# cp -rv webpack/index.js build/index.js
117117
# cp -rv webpack/index-dev.js build/index-dev.js
118118

119-
es:
120-
cp -rv esm/index.js build/index.js
121-
cp -rv esm/index-dev.js build/index-dev.js
122-
cp -rv esm/jquery.global.js build/jquery.global.js
119+
cjs:
120+
cp -rv cjs/index.js build/index.js
121+
cp -rv cjs/index-dev.js build/index-dev.js
122+
cp -rv cjs/jquery.global.js build/jquery.global.js
123123

124124
clean:
125125
rm -rf $(BUILD_DIR)

cjs/index-dev.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const jQuery = require("./jquery.global");
2+
require("./mathquill.js");
3+
require("./mathquill.css");
4+
const MathQuill = window.MathQuill;
5+
module.exports = MathQuill;

cjs/index.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const jQuery = require("./jquery.global");
2+
require("./mathquill.min.js");
3+
require("./mathquill.css");
4+
const MathQuill = window.MathQuill;
5+
module.exports = MathQuill;
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
import jQuery from "jquery";
2-
window.jQuery = jQuery;
2+
if (!window.jQuery) {
3+
window.jQuery = jQuery;
4+
}
35
export default jQuery;

esm/index-dev.js

-4
This file was deleted.

esm/index.js

-4
This file was deleted.

0 commit comments

Comments
 (0)