Use babel-plugin-preval instead of own unicodeMake for unicodeSymbols (#2153)

* Use babel-plugin-preval instead of own unicodeMake for unicodeSymbols

* Fix circular dependency transpiling issue

* Flow type unicodeSymbols.js

Co-authored-by: Erik Demaine <edemaine@mit.edu>
This commit is contained in:
ylemkimon
2020-07-09 06:58:11 +09:00
committed by GitHub
parent f2886af6de
commit 3272472ffe
9 changed files with 95 additions and 404 deletions

View File

@@ -28,6 +28,7 @@
"babel-jest": "^24.1.0",
"babel-loader": "^8.0.5",
"babel-plugin-istanbul": "^5.1.1",
"babel-plugin-preval": "^3.0.1",
"babel-plugin-version-inline": "^1.0.0",
"benchmark": "^2.1.4",
"browserslist": "^4.7.1",
@@ -75,7 +76,7 @@
},
"bin": "cli.js",
"scripts": {
"test": "yarn prestart && yarn test:lint && yarn test:flow && yarn test:jest",
"test": "yarn test:lint && yarn test:flow && yarn test:jest",
"test:lint": "yarn test:lint:js && yarn test:lint:css",
"test:lint:js": "eslint *.js src static test contrib dockers website",
"test:lint:css": "stylelint src/katex.less static/main.css contrib/**/*.css website/static/**/*.css",
@@ -85,14 +86,13 @@
"test:jest:update": "jest --updateSnapshot",
"test:jest:coverage": "jest --coverage",
"test:screenshots": "yarn test:screenshots:update --verify",
"test:screenshots:update": "yarn prestart && dockers/screenshotter/screenshotter.sh",
"test:perf": "yarn prestart && NODE_ENV=test node test/perf-test.js",
"test:screenshots:update": "dockers/screenshotter/screenshotter.sh",
"test:perf": "NODE_ENV=test node test/perf-test.js",
"clean": "rm -rf dist/ node_modules/",
"clean-install": "yarn clean && yarn",
"prestart": "node src/unicodeMake.js",
"start": "webpack-dev-server --hot --config webpack.dev.js",
"analyze": "webpack --config webpack.analyze.js",
"build": "yarn prestart && rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack",
"build": "rimraf dist/ && mkdirp dist && cp README.md dist && rollup -c && webpack",
"watch": "yarn build --watch",
"dist": "yarn test && yarn build && yarn dist:zip",
"dist:zip": "rimraf katex/ katex.tar.gz katex.zip && cp -R dist katex && tar czf katex.tar.gz katex && zip -rq katex.zip katex && rimraf katex/"
@@ -111,7 +111,7 @@
"collectCoverageFrom": [
"src/**/*.js",
"contrib/**/*.js",
"!src/unicodeMake.js",
"!src/unicodeSymbols.js",
"!contrib/mhchem/**"
],
"setupFilesAfterEnv": [