mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 11:48:41 +00:00
Upgrade the source to use ES6 syntax including classes, import and static properties (#679)
* Add babel transform-class-properties to have static class properties * Upgrade Lexer and Parser files to use ES6 classes * Update eslint max line length to 90 character (more indent because of using ES6 classes) * Upgrade eslint and jasmin to support ES stage-2 features * Use static properties to place constants near their functions * Migrate all remaining sources to ES6 syntax * Increase eslint max line length to 84 * Remove non-babelified endpoint in dev server.js * Clean up server.js functions after removing browserified * Make screenshotter not to use babel endpoint as we babelify everything now
This commit is contained in:
committed by
Kevin Barabash
parent
0edd3d1bbb
commit
a019f36f8a
@@ -4,8 +4,8 @@
|
||||
/* global it: false */
|
||||
/* global describe: false */
|
||||
|
||||
const parseTree = require("../src/parseTree");
|
||||
const Settings = require("../src/Settings");
|
||||
import parseTree from "../src/parseTree";
|
||||
import Settings from "../src/Settings";
|
||||
|
||||
const defaultSettings = new Settings({});
|
||||
|
||||
|
@@ -5,6 +5,7 @@
|
||||
"contrib/**/*[sS]pec.js"
|
||||
],
|
||||
"helpers": [
|
||||
"helpers/**/*.js"
|
||||
"helpers/**/*.js",
|
||||
"node_modules/babel-core/register.js"
|
||||
]
|
||||
}
|
||||
|
@@ -5,14 +5,14 @@
|
||||
/* global it: false */
|
||||
/* global describe: false */
|
||||
|
||||
const buildMathML = require("../src/buildMathML");
|
||||
const buildTree = require("../src/buildTree");
|
||||
const katex = require("../katex");
|
||||
const ParseError = require("../src/ParseError");
|
||||
const parseTree = require("../src/parseTree");
|
||||
const Options = require("../src/Options");
|
||||
const Settings = require("../src/Settings");
|
||||
const Style = require("../src/Style");
|
||||
import buildMathML from "../src/buildMathML";
|
||||
import buildTree from "../src/buildTree";
|
||||
import katex from "../katex";
|
||||
import ParseError from "../src/ParseError";
|
||||
import parseTree from "../src/parseTree";
|
||||
import Options from "../src/Options";
|
||||
import Settings from "../src/Settings";
|
||||
import Style from "../src/Style";
|
||||
|
||||
const defaultSettings = new Settings({});
|
||||
const defaultOptions = new Options({
|
||||
|
Reference in New Issue
Block a user