From e2176f00fdee1f51868cc82fee2a85d37c409c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Thu, 23 Aug 2018 22:08:19 +0200 Subject: [PATCH] move extensions to own package --- build/examples/webpack.config.js | 1 + examples/Components/Routes/Embeds/Iframe.js | 2 +- examples/Components/Routes/Embeds/index.vue | 33 ++++++++++++- .../Components/Routes/HidingMenuBar/index.vue | 36 ++++++++++++++- examples/Components/Routes/Links/index.vue | 32 ++++++++++++- .../Routes/MarkdownShortcuts/index.vue | 36 ++++++++++++++- examples/Components/Routes/MenuBar/index.vue | 36 ++++++++++++++- .../Components/Routes/MenuBubble/index.vue | 34 ++++++++++++-- examples/Components/Routes/ReadOnly/index.vue | 36 ++++++++++++++- examples/Components/Routes/TodoList/index.vue | 36 ++++++++++++++- packages/tiptap-extensions/package.json | 26 +++++++++++ packages/tiptap-extensions/src/index.js | 14 ++++++ .../src/marks/Bold.js | 2 +- .../src/marks/Code.js | 2 +- .../src/marks/Italic.js | 2 +- .../src/marks/Link.js | 2 +- .../src/nodes/Blockquote.js | 2 +- .../src/nodes/BulletList.js | 2 +- .../src/nodes/CodeBlock.js | 2 +- .../src/nodes/HardBreak.js | 2 +- .../src/nodes/Heading.js | 2 +- .../src/nodes/ListItem.js | 2 +- .../src/nodes/OrderedList.js | 2 +- .../src/nodes/TodoItem.js | 2 +- .../src/nodes/TodoList.js | 2 +- packages/tiptap/src/components/editor.js | 2 - packages/tiptap/src/index.js | 4 +- packages/tiptap/src/marks/index.js | 11 ----- packages/tiptap/src/nodes/Paragraph.js | 6 --- packages/tiptap/src/nodes/index.js | 22 +-------- packages/tiptap/src/utils/mark.js | 46 +++++++++++++++++++ packages/tiptap/src/utils/node.js | 46 +++++++++++++++++++ 32 files changed, 420 insertions(+), 65 deletions(-) create mode 100644 packages/tiptap-extensions/package.json create mode 100644 packages/tiptap-extensions/src/index.js rename packages/{tiptap => tiptap-extensions}/src/marks/Bold.js (93%) rename packages/{tiptap => tiptap-extensions}/src/marks/Code.js (90%) rename packages/{tiptap => tiptap-extensions}/src/marks/Italic.js (91%) rename packages/{tiptap => tiptap-extensions}/src/marks/Link.js (95%) rename packages/{tiptap => tiptap-extensions}/src/nodes/Blockquote.js (93%) rename packages/{tiptap => tiptap-extensions}/src/nodes/BulletList.js (93%) rename packages/{tiptap => tiptap-extensions}/src/nodes/CodeBlock.js (94%) rename packages/{tiptap => tiptap-extensions}/src/nodes/HardBreak.js (93%) rename packages/{tiptap => tiptap-extensions}/src/nodes/Heading.js (96%) rename packages/{tiptap => tiptap-extensions}/src/nodes/ListItem.js (93%) rename packages/{tiptap => tiptap-extensions}/src/nodes/OrderedList.js (96%) rename packages/{tiptap => tiptap-extensions}/src/nodes/TodoItem.js (97%) rename packages/{tiptap => tiptap-extensions}/src/nodes/TodoList.js (93%) delete mode 100644 packages/tiptap/src/marks/index.js create mode 100644 packages/tiptap/src/utils/mark.js create mode 100644 packages/tiptap/src/utils/node.js diff --git a/build/examples/webpack.config.js b/build/examples/webpack.config.js index 9b889fa9c..772b5aceb 100644 --- a/build/examples/webpack.config.js +++ b/build/examples/webpack.config.js @@ -42,6 +42,7 @@ export default { 'tiptap-commands': path.resolve(rootPath, '../packages/tiptap-commands/src'), 'tiptap-utils': path.resolve(rootPath, '../packages/tiptap-utils/src'), 'tiptap-models': path.resolve(rootPath, '../packages/tiptap-models/src'), + 'tiptap-extensions': path.resolve(rootPath, '../packages/tiptap-extensions/src'), }, modules: [ srcPath, diff --git a/examples/Components/Routes/Embeds/Iframe.js b/examples/Components/Routes/Embeds/Iframe.js index 078d0e522..35a5d452c 100644 --- a/examples/Components/Routes/Embeds/Iframe.js +++ b/examples/Components/Routes/Embeds/Iframe.js @@ -1,4 +1,4 @@ -import { Node } from 'tiptap-models' +import { Node } from 'tiptap' export default class IframeNode extends Node { diff --git a/examples/Components/Routes/Embeds/index.vue b/examples/Components/Routes/Embeds/index.vue index f67b17c0a..48c74a05e 100644 --- a/examples/Components/Routes/Embeds/index.vue +++ b/examples/Components/Routes/Embeds/index.vue @@ -19,6 +19,21 @@