mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 04:08:43 +00:00
Inline version using babel-plugin-version-inline
(#1475)
* Inline version using `babel-plugin-version-inline` * Fix `unicodeSymbols.js` generation
This commit is contained in:
3
.babelrc
3
.babelrc
@@ -7,7 +7,8 @@
|
||||
],
|
||||
"plugins": [
|
||||
"transform-runtime",
|
||||
"transform-class-properties"
|
||||
"transform-class-properties",
|
||||
"version-inline"
|
||||
],
|
||||
"env": {
|
||||
"test": {
|
||||
|
4
katex.js
4
katex.js
@@ -24,7 +24,7 @@ import {defineSymbol} from './src/symbols';
|
||||
import {defineMacro} from './src/macros';
|
||||
import {setFontMetrics} from './src/fontMetrics';
|
||||
|
||||
import {version} from "./package.json";
|
||||
declare var __VERSION__: string;
|
||||
|
||||
/**
|
||||
* Parse and build an expression, and place that expression in the DOM node
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
/**
|
||||
* Current KaTeX version
|
||||
*/
|
||||
version,
|
||||
version: __VERSION__,
|
||||
/**
|
||||
* Renders the given LaTeX into an HTML+MathML combination, and adds
|
||||
* it as a child to the specified DOM node.
|
||||
|
6
package-lock.json
generated
6
package-lock.json
generated
@@ -1273,6 +1273,12 @@
|
||||
"babel-types": "^6.24.1"
|
||||
}
|
||||
},
|
||||
"babel-plugin-version-inline": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/babel-plugin-version-inline/-/babel-plugin-version-inline-1.0.0.tgz",
|
||||
"integrity": "sha1-uZtvkl20pMZ4nrCINuZtEo3VmT8=",
|
||||
"dev": true
|
||||
},
|
||||
"babel-preset-es2015": {
|
||||
"version": "6.24.1",
|
||||
"resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",
|
||||
|
@@ -21,6 +21,7 @@
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-plugin-transform-class-properties": "^6.23.0",
|
||||
"babel-plugin-transform-runtime": "^6.15.0",
|
||||
"babel-plugin-version-inline": "^1.0.0",
|
||||
"babel-preset-es2015": "^6.18.0",
|
||||
"babel-preset-flow": "^6.23.0",
|
||||
"babel-register": "^6.26.0",
|
||||
@@ -69,7 +70,7 @@
|
||||
"test:perf": "npm run prestart && NODE_ENV=test node test/perf-test.js",
|
||||
"clean": "rm -rf build/* node_modules/",
|
||||
"clean-install": "npm run clean && npm i",
|
||||
"prestart": "node check-node-version.js && check-dependencies && cd src && node unicodeMake.js >unicodeSymbols.js",
|
||||
"prestart": "node check-node-version.js && check-dependencies && node src/unicodeMake.js > src/unicodeSymbols.js",
|
||||
"start": "webpack-dev-server --hot --config webpack.dev.js",
|
||||
"analyze": "webpack --config webpack.analyze.js",
|
||||
"build": "npm run prestart && rimraf build/* && webpack",
|
||||
|
Reference in New Issue
Block a user