From 0f1ca13b7fcb365e72c24b293f481f1fc73f7f5a Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Tue, 24 Mar 2020 17:50:18 +0100 Subject: [PATCH] =?UTF-8?q?:fountain=5Fpen:=20Am=C3=A9liore=20la=20page=20?= =?UTF-8?q?de=20documentation=20de=20publicode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Ajoute le tuto - Rend tous les exemples executables --- source/components/Mecanisms.tsx | 4 +- source/components/rule/ColoredYaml.tsx | 11 - source/components/rule/Rule.js | 4 +- source/components/rule/RuleSource.tsx | 4 +- source/components/ui/PublicodeHighlighter.tsx | 21 ++ source/components/ui/index.css | 9 +- source/components/utils/markdown.tsx | 17 +- {publicode => source/engine}/README.md | 93 ++++-- source/engine/known-mecanisms.yaml | 219 ------------- source/engine/mecanisms.js | 28 +- source/engine/mecanisms.yaml | 308 ++++++++++++++++++ source/engine/mecanisms/barème.ts | 2 +- source/engine/mecanisms/grille.ts | 2 +- source/engine/mecanisms/tauxProgressif.ts | 2 +- source/sites/publi.codes/Header.js | 2 +- source/sites/publi.codes/Landing.js | 67 +--- source/sites/publi.codes/Mécanismes.tsx | 0 source/webpack.common.js | 4 + 18 files changed, 436 insertions(+), 361 deletions(-) delete mode 100644 source/components/rule/ColoredYaml.tsx create mode 100644 source/components/ui/PublicodeHighlighter.tsx rename {publicode => source/engine}/README.md (72%) delete mode 100644 source/engine/known-mecanisms.yaml create mode 100644 source/engine/mecanisms.yaml create mode 100644 source/sites/publi.codes/Mécanismes.tsx diff --git a/source/components/Mecanisms.tsx b/source/components/Mecanisms.tsx index 62ad97a6f..6293fc3e1 100644 --- a/source/components/Mecanisms.tsx +++ b/source/components/Mecanisms.tsx @@ -1,5 +1,5 @@ // Page listing the engine's currently implemented mecanisms and their tests -import knownMecanims from 'Engine/known-mecanisms.yaml' +import mécanismes from 'Engine/mecanisms.yaml' import { fromPairs, has, toPairs } from 'ramda' import React from 'react' import './Mecanisms.css' @@ -24,7 +24,7 @@ export default function Mecanisms() { partageant le code de mecanisms.test.js