From e4c83c33ccf4f6fcdf68c871247c0ce295f6f445 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 30 Aug 2023 15:34:58 +0400 Subject: [PATCH] Up docs --- .eslintrc | 2 +- docs/api.js | 3 ++- src/canvas/types.ts | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index a25e2816f..c5c725733 100644 --- a/.eslintrc +++ b/.eslintrc @@ -20,6 +20,6 @@ }], "ignorePatterns": [ "dist/*", - "private/*", + "private/*" ] } diff --git a/docs/api.js b/docs/api.js index b02855461..95f16f937 100644 --- a/docs/api.js +++ b/docs/api.js @@ -19,9 +19,10 @@ const getEventsMdFromTypes = async (filePath) => { .then(cm => documentation.formats.md(cm, /*{ markdownToc: true }*/)); const indexFrom = resTypes.indexOf(START_EVENTS) + START_EVENTS.length; const indexTo = resTypes.indexOf(END_EVENTS); - + // console.log(`${resTypes}`) const result = resTypes.substring(indexFrom, indexTo) .replace(/\n### Examples\n/gi, '') + .replace(/\n## types\n/gi, '') .replace(/## /gi, '* ') .replace(/\\`/gi, '`') .replace(/##/gi, '') diff --git a/src/canvas/types.ts b/src/canvas/types.ts index e3112f6a9..d1798e148 100644 --- a/src/canvas/types.ts +++ b/src/canvas/types.ts @@ -102,3 +102,6 @@ export enum CanvasEvents { pointer = 'canvas:pointer', } /**{END_EVENTS}*/ + +// need this to avoid the TS documentation generator to break +export default CanvasEvents;