From d3f4b7d2fff26a13df5b89373acc140028ae90cf Mon Sep 17 00:00:00 2001 From: geekan Date: Thu, 2 Mar 2023 20:46:13 +0300 Subject: [PATCH] refactor: added some comments --- src/index.ts | 6 ++++++ src/types/index.ts | 3 +++ vite.config.ts | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index b947221..573f96c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,6 +43,9 @@ export default class Paragraph implements BlockTool { */ private readonly element: HTMLDivElement; + /** + * CSS class names + */ private readonly CSS: ParagraphToolCSS; /** @@ -50,6 +53,9 @@ export default class Paragraph implements BlockTool { */ private readonly placeholder: string; + /** + * Will save empty paragraphs if set to true + */ private readonly preserveBlank: boolean; /** diff --git a/src/types/index.ts b/src/types/index.ts index 198872d..47f73da 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -22,6 +22,9 @@ export interface ParagraphToolConfig extends ToolConfig { preserveBlank?: boolean; } +/** + * CSS class names for elements created by the plugin + */ export interface ParagraphToolCSS { /** * Block CSS class name diff --git a/vite.config.ts b/vite.config.ts index a8cad8e..30c6989 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -19,7 +19,7 @@ export default defineConfig({ build: { lib: { entry: path.resolve(__dirname, 'src', 'index.ts'), - name: 'paragraph', + name: 'Paragraph', formats: ['umd', 'es'], fileName: 'paragraph', },