Enlève mecanismDoc des exports de publicodes
Déplace l'import du fichier dans publicodes-react, le seul endroit où il est utilisépull/1402/head
parent
966330905a
commit
794d35fd02
|
@ -9,5 +9,4 @@ export const transformAST = publicodes.transformAST
|
|||
export const formatValue = publicodes.formatValue
|
||||
export const utils = publicodes.utils
|
||||
export const UNSAFE_isNotApplicable = publicodes.UNSAFE_isNotApplicable
|
||||
export const mecanismsDoc = publicodes.mecanismsDoc
|
||||
export const evaluateRule = publicodes.evaluateRule
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable @typescript-eslint/ban-types */
|
||||
import { reduceAST } from './AST'
|
||||
import { ASTNode, EvaluatedNode, NodeKind } from './AST/types'
|
||||
import { evaluationFunctions } from './evaluationFunctions'
|
||||
|
@ -38,7 +37,6 @@ export type EvaluationOptions = Partial<{
|
|||
unit: string
|
||||
}>
|
||||
|
||||
export { default as mecanismsDoc } from '../../docs/mecanisms.yaml'
|
||||
export { reduceAST, transformAST } from './AST/index'
|
||||
export { Evaluation, Unit } from './AST/types'
|
||||
export { capitalise0, formatValue } from './format'
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
data
|
|
@ -7,10 +7,9 @@
|
|||
"license": "MIT",
|
||||
"readme": "../README.md",
|
||||
"scripts": {
|
||||
"clean": "rimraf dist node_modules",
|
||||
"clean": "rimraf dist node_modules data",
|
||||
"build": "tsc",
|
||||
"clean": "rimraf dist node_modules",
|
||||
"prepare": "yarn run build",
|
||||
"prepare": "mkdir -p ./source/data && yarn run --silent js-yaml ../docs/mecanisms.yaml >| ./source/data/mecanisms.json && yarn run build",
|
||||
"test": "echo \"Error: no test specified\""
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -31,6 +30,7 @@
|
|||
"react-router-hash-link": "^1.2.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"js-yaml": "^4.0.0",
|
||||
"typescript": "^4.1.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,25 +1,21 @@
|
|||
import React, { createContext, useContext, useState } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import styled from 'styled-components'
|
||||
import { capitalise0, formatValue, simplifyNodeUnit } from 'publicodes'
|
||||
import {
|
||||
mecanismsDoc,
|
||||
formatValue,
|
||||
capitalise0,
|
||||
simplifyNodeUnit,
|
||||
} from 'publicodes'
|
||||
import {
|
||||
Evaluation,
|
||||
EvaluatedNode,
|
||||
Evaluation,
|
||||
Types,
|
||||
Unit,
|
||||
} from 'publicodes/source/AST/types'
|
||||
import { ReferenceNode } from 'publicodes/source/reference'
|
||||
import React, { createContext, useContext, useState } from 'react'
|
||||
import { Trans } from 'react-i18next'
|
||||
import styled from 'styled-components'
|
||||
import { EngineContext } from '../contexts'
|
||||
import mecanismsDoc from '../data/mecanisms.json'
|
||||
import Explanation from '../Explanation'
|
||||
import { Markdown } from '../Markdown'
|
||||
import Overlay from '../Overlay'
|
||||
import { RuleLinkWithContext } from '../RuleLink'
|
||||
import mecanismColors from './colors'
|
||||
import Explanation from '../Explanation'
|
||||
import { ReferenceNode } from 'publicodes/source/reference'
|
||||
import { EngineContext } from '../contexts'
|
||||
import { Markdown } from '../Markdown'
|
||||
|
||||
export function ConstantNode({ nodeValue, type, fullPrecision, unit }) {
|
||||
if (nodeValue === null) {
|
||||
|
|
12
yarn.lock
12
yarn.lock
|
@ -3153,6 +3153,11 @@ argparse@^1.0.7:
|
|||
dependencies:
|
||||
sprintf-js "~1.0.2"
|
||||
|
||||
argparse@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
|
||||
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
|
||||
|
||||
arr-diff@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
|
||||
|
@ -8407,6 +8412,13 @@ js-yaml@^3.13.1, js-yaml@^3.5.2, js-yaml@^3.7.0:
|
|||
argparse "^1.0.7"
|
||||
esprima "^4.0.0"
|
||||
|
||||
js-yaml@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f"
|
||||
integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q==
|
||||
dependencies:
|
||||
argparse "^2.0.1"
|
||||
|
||||
js-yaml@~3.7.0:
|
||||
version "3.7.0"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
|
||||
|
|
Loading…
Reference in New Issue