From 15c7e1955ab91576dc80998ec88ed1870976138e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Ku=CC=88hn?= Date: Wed, 25 Aug 2021 11:52:20 +0200 Subject: [PATCH] add basic vite setup --- demos/index.html | 12 + demos/package.json | 50 + demos/postcss.config.js | 6 + demos/preview/Demo.vue | 241 +++++ demos/preview/DemoFrame.vue | 58 ++ demos/preview/Shiki.vue | 148 +++ demos/preview/index.html | 12 + demos/preview/index.js | 57 ++ demos/preview/index.vue | 10 + demos/preview/style.css | 138 +++ demos/public/_redirects | 1 + demos/setup/helper.ts | 38 + demos/setup/react.tsx | 19 + demos/setup/style.scss | 59 ++ demos/setup/vue.ts | 18 + demos/shims-vue.d.ts | 6 + demos/src/Examples/Default/React/index.html | 15 + demos/src/Examples/Default/React/index.jsx | 168 ++++ .../src/Examples/Default/React/index.spec.js | 22 + demos/src/Examples/Default/React/styles.scss | 56 ++ demos/src/Examples/Default/Vue/index.html | 15 + demos/src/Examples/Default/Vue/index.spec.js | 22 + demos/src/Examples/Default/Vue/index.vue | 188 ++++ demos/tailwind.config.js | 106 +++ demos/tsconfig.json | 7 + demos/vite.config.ts | 143 +++ package.json | 2 + yarn.lock | 862 +++++++++++++++++- 28 files changed, 2452 insertions(+), 27 deletions(-) create mode 100644 demos/index.html create mode 100644 demos/package.json create mode 100644 demos/postcss.config.js create mode 100644 demos/preview/Demo.vue create mode 100644 demos/preview/DemoFrame.vue create mode 100644 demos/preview/Shiki.vue create mode 100644 demos/preview/index.html create mode 100644 demos/preview/index.js create mode 100644 demos/preview/index.vue create mode 100644 demos/preview/style.css create mode 100644 demos/public/_redirects create mode 100644 demos/setup/helper.ts create mode 100644 demos/setup/react.tsx create mode 100644 demos/setup/style.scss create mode 100644 demos/setup/vue.ts create mode 100644 demos/shims-vue.d.ts create mode 100644 demos/src/Examples/Default/React/index.html create mode 100644 demos/src/Examples/Default/React/index.jsx create mode 100644 demos/src/Examples/Default/React/index.spec.js create mode 100644 demos/src/Examples/Default/React/styles.scss create mode 100644 demos/src/Examples/Default/Vue/index.html create mode 100644 demos/src/Examples/Default/Vue/index.spec.js create mode 100644 demos/src/Examples/Default/Vue/index.vue create mode 100644 demos/tailwind.config.js create mode 100644 demos/tsconfig.json create mode 100644 demos/vite.config.ts diff --git a/demos/index.html b/demos/index.html new file mode 100644 index 000000000..c925919f6 --- /dev/null +++ b/demos/index.html @@ -0,0 +1,12 @@ + + + + + + Index + + +
+ Preview + + diff --git a/demos/package.json b/demos/package.json new file mode 100644 index 000000000..17a197f47 --- /dev/null +++ b/demos/package.json @@ -0,0 +1,50 @@ +{ + "name": "tiptap-demos", + "version": "0.0.0", + "private": true, + "scripts": { + "start": "vite", + "build": "vite build", + "_build": "vue-tsc --noEmit && vite build", + "serve": "vite preview --port 3000" + }, + "dependencies": { + "@tiptap/core": "^2.0.0-beta.101", + "@tiptap/starter-kit": "^2.0.0-beta.99", + "@tiptap/vue-3": "^2.0.0-beta.52", + "@types/prosemirror-commands": "^1.0.4", + "@types/prosemirror-inputrules": "^1.0.4", + "@types/prosemirror-keymap": "^1.0.4", + "@types/prosemirror-model": "^1.13.1", + "@types/prosemirror-schema-list": "^1.0.3", + "@types/prosemirror-state": "^1.2.7", + "@types/prosemirror-transform": "^1.1.4", + "@types/prosemirror-view": "^1.17.2", + "@vitejs/plugin-react-refresh": "^1.3.6", + "autoprefixer": "^10.3.1", + "iframe-resizer": "^4.3.2", + "postcss": "^8.3.6", + "prosemirror-view": "^1.18.11", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "react-router-dom": "^5.2.0", + "shiki": "^0.9.7", + "tailwindcss": "^2.2.7", + "uuid": "^8.3.2", + "vue": "^3.0.5", + "vue-router": "^4.0.11", + "y-prosemirror": "^1.0.9", + "y-webrtc": "^10.2.0", + "y-websocket": "^1.3.16", + "yjs": "^13.5.11" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^1.5.0", + "@vue/compiler-sfc": "^3.1.4", + "globby": "^11.0.4", + "sass": "^1.35.2", + "typescript": "^4.3.5", + "vite": "^2.5.1", + "vue-tsc": "^0.3.0" + } +} diff --git a/demos/postcss.config.js b/demos/postcss.config.js new file mode 100644 index 000000000..33ad091d2 --- /dev/null +++ b/demos/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/demos/preview/Demo.vue b/demos/preview/Demo.vue new file mode 100644 index 000000000..b6c75749a --- /dev/null +++ b/demos/preview/Demo.vue @@ -0,0 +1,241 @@ + + + diff --git a/demos/preview/DemoFrame.vue b/demos/preview/DemoFrame.vue new file mode 100644 index 000000000..3745b1abd --- /dev/null +++ b/demos/preview/DemoFrame.vue @@ -0,0 +1,58 @@ +