mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-10 05:28:41 +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)
|
||||
$(NODE) server.js
|
||||
|
||||
flow: $(NIS)
|
||||
node_modules/.bin/flow
|
||||
|
||||
test: $(NIS)
|
||||
node_modules/.bin/jest
|
||||
|
||||
|
@@ -46,8 +46,8 @@
|
||||
},
|
||||
"bin": "cli.js",
|
||||
"scripts": {
|
||||
"test": "make lint test",
|
||||
"lint": "make lint",
|
||||
"test": "make lint flow test",
|
||||
"prepublish": "make NIS= dist"
|
||||
},
|
||||
"pre-commit": [
|
||||
|
@@ -56,6 +56,10 @@ type FunctionSpec<T> = {
|
||||
// (default false)
|
||||
allowedInText?: boolean,
|
||||
|
||||
// Whether or not the function is allowed inside text mode
|
||||
// (default true)
|
||||
allowedInMath?: boolean,
|
||||
|
||||
// (optional) The number of optional arguments the function
|
||||
// should parse. If the optional arguments aren't found,
|
||||
// `null` will be passed to the handler in their place.
|
||||
@@ -115,7 +119,9 @@ export default function defineFunction({
|
||||
argTypes: props.argTypes,
|
||||
greediness: (props.greediness === undefined) ? 1 : props.greediness,
|
||||
allowedInText: !!props.allowedInText,
|
||||
allowedInMath: props.allowedInMath,
|
||||
allowedInMath: (props.allowedInMath === undefined)
|
||||
? true
|
||||
: props.allowedInMath,
|
||||
numOptionalArgs: props.numOptionalArgs || 0,
|
||||
infix: !!props.infix,
|
||||
handler: handler,
|
||||
|
Reference in New Issue
Block a user