mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-05 19:28:39 +00:00
run flow as part of 'npm test' so it runs on travis-ci
This commit is contained in:
committed by
Kevin Barabash
parent
d8116bdc64
commit
6db61cb219
3
Makefile
3
Makefile
@@ -101,6 +101,9 @@ compress: build/katex.min.js build/katex.min.css
|
|||||||
serve: $(NIS)
|
serve: $(NIS)
|
||||||
$(NODE) server.js
|
$(NODE) server.js
|
||||||
|
|
||||||
|
flow: $(NIS)
|
||||||
|
node_modules/.bin/flow
|
||||||
|
|
||||||
test: $(NIS)
|
test: $(NIS)
|
||||||
node_modules/.bin/jest
|
node_modules/.bin/jest
|
||||||
|
|
||||||
|
@@ -46,8 +46,8 @@
|
|||||||
},
|
},
|
||||||
"bin": "cli.js",
|
"bin": "cli.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "make lint test",
|
|
||||||
"lint": "make lint",
|
"lint": "make lint",
|
||||||
|
"test": "make lint flow test",
|
||||||
"prepublish": "make NIS= dist"
|
"prepublish": "make NIS= dist"
|
||||||
},
|
},
|
||||||
"pre-commit": [
|
"pre-commit": [
|
||||||
|
@@ -56,6 +56,10 @@ type FunctionSpec<T> = {
|
|||||||
// (default false)
|
// (default false)
|
||||||
allowedInText?: boolean,
|
allowedInText?: boolean,
|
||||||
|
|
||||||
|
// Whether or not the function is allowed inside text mode
|
||||||
|
// (default true)
|
||||||
|
allowedInMath?: boolean,
|
||||||
|
|
||||||
// (optional) The number of optional arguments the function
|
// (optional) The number of optional arguments the function
|
||||||
// should parse. If the optional arguments aren't found,
|
// should parse. If the optional arguments aren't found,
|
||||||
// `null` will be passed to the handler in their place.
|
// `null` will be passed to the handler in their place.
|
||||||
@@ -115,7 +119,9 @@ export default function defineFunction({
|
|||||||
argTypes: props.argTypes,
|
argTypes: props.argTypes,
|
||||||
greediness: (props.greediness === undefined) ? 1 : props.greediness,
|
greediness: (props.greediness === undefined) ? 1 : props.greediness,
|
||||||
allowedInText: !!props.allowedInText,
|
allowedInText: !!props.allowedInText,
|
||||||
allowedInMath: props.allowedInMath,
|
allowedInMath: (props.allowedInMath === undefined)
|
||||||
|
? true
|
||||||
|
: props.allowedInMath,
|
||||||
numOptionalArgs: props.numOptionalArgs || 0,
|
numOptionalArgs: props.numOptionalArgs || 0,
|
||||||
infix: !!props.infix,
|
infix: !!props.infix,
|
||||||
handler: handler,
|
handler: handler,
|
||||||
|
Reference in New Issue
Block a user