Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use rollup to bundle runmode-standalone and runmode-node #6314

Merged
merged 10 commits into from
Jun 18, 2020
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
.idea
*.iml
/lib/codemirror.js
/addon/runmode/runmode-standalone.js
/addon/runmode/runmode.node.js
**/.DS_Store
164 changes: 0 additions & 164 deletions addon/runmode/runmode-standalone.js

This file was deleted.

9 changes: 5 additions & 4 deletions addon/runmode/runmode.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@

CodeMirror.runMode = function(string, modespec, callback, options) {
var mode = CodeMirror.getMode(CodeMirror.defaults, modespec);
var ie = /MSIE \d/.test(navigator.userAgent);
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;

// Create a tokenizing callback function if passed-in callback is a DOM element.
if (callback.appendChild) {
var tabSize = (options && options.tabSize) || CodeMirror.defaults.tabSize;
var ie = /MSIE \d/.test(navigator.userAgent);
var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9);
var node = callback, col = 0;
node.innerHTML = "";
callback = function(text, style) {
Expand Down Expand Up @@ -45,7 +46,7 @@ CodeMirror.runMode = function(string, modespec, callback, options) {
pos = idx + 1;
}
}

// Create a node with token style and append it to the callback DOM element.
if (style) {
var sp = node.appendChild(document.createElement("span"));
sp.className = "cm-" + style.replace(/ +/g, " cm-");
Expand Down
197 changes: 0 additions & 197 deletions addon/runmode/runmode.node.js

This file was deleted.