From dc088b3109d8851e8c071bb3afbc5afc2c309021 Mon Sep 17 00:00:00 2001 From: Okwukwe Ewurum Date: Mon, 4 Sep 2023 20:44:59 +0100 Subject: [PATCH 1/3] add an example usage with vuejs using quill-vue --- vuejs/.gitignore | 25 ++++++++++++++ vuejs/index.html | 12 +++++++ vuejs/package.json | 23 +++++++++++++ vuejs/src/App.vue | 78 ++++++++++++++++++++++++++++++++++++++++++++ vuejs/src/jquery.js | 3 ++ vuejs/src/main.js | 10 ++++++ vuejs/vite.config.js | 7 ++++ 7 files changed, 158 insertions(+) create mode 100644 vuejs/.gitignore create mode 100644 vuejs/index.html create mode 100644 vuejs/package.json create mode 100644 vuejs/src/App.vue create mode 100644 vuejs/src/jquery.js create mode 100644 vuejs/src/main.js create mode 100644 vuejs/vite.config.js diff --git a/vuejs/.gitignore b/vuejs/.gitignore new file mode 100644 index 0000000..c20018b --- /dev/null +++ b/vuejs/.gitignore @@ -0,0 +1,25 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? +.vscode/ \ No newline at end of file diff --git a/vuejs/index.html b/vuejs/index.html new file mode 100644 index 0000000..2f2edba --- /dev/null +++ b/vuejs/index.html @@ -0,0 +1,12 @@ + + + + + + mathquill4quill demo (Vue 3) + + +
+ + + diff --git a/vuejs/package.json b/vuejs/package.json new file mode 100644 index 0000000..ebb6ea5 --- /dev/null +++ b/vuejs/package.json @@ -0,0 +1,23 @@ +{ + "name": "rvuejs", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "start": "vite --port 4043", + "build": "vite build", + "preview": "vite preview" + }, + "dependencies": { + "@edtr-io/mathquill": "^0.11.0", + "@vueup/vue-quill": "^1.2.0", + "jquery": "^3.7.1", + "katex": "^0.16.8", + "mathquill4quill": "^2.4.0", + "vue": "^3.3.4" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^4.2.3", + "vite": "^4.4.5" + } +} diff --git a/vuejs/src/App.vue b/vuejs/src/App.vue new file mode 100644 index 0000000..6f9fc44 --- /dev/null +++ b/vuejs/src/App.vue @@ -0,0 +1,78 @@ + + + + + \ No newline at end of file diff --git a/vuejs/src/jquery.js b/vuejs/src/jquery.js new file mode 100644 index 0000000..1c2e771 --- /dev/null +++ b/vuejs/src/jquery.js @@ -0,0 +1,3 @@ +import $ from 'jquery'; + +window.jQuery = window.$ = $; diff --git a/vuejs/src/main.js b/vuejs/src/main.js new file mode 100644 index 0000000..1c6f0da --- /dev/null +++ b/vuejs/src/main.js @@ -0,0 +1,10 @@ +import { createApp } from 'vue' +import 'katex/dist/katex.css'; +import '@vueup/vue-quill/dist/vue-quill.bubble.css'; +import '@vueup/vue-quill/dist/vue-quill.snow.css'; + +import 'mathquill4quill/mathquill4quill.css'; + +import App from './App.vue' + +createApp(App).mount('#app') diff --git a/vuejs/vite.config.js b/vuejs/vite.config.js new file mode 100644 index 0000000..05c1740 --- /dev/null +++ b/vuejs/vite.config.js @@ -0,0 +1,7 @@ +import { defineConfig } from 'vite' +import vue from '@vitejs/plugin-vue' + +// https://vitejs.dev/config/ +export default defineConfig({ + plugins: [vue()], +}) From 6c95494868281787da2f51aeaad2a31d3b6fe397 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Wed, 4 Oct 2023 20:00:48 +0200 Subject: [PATCH 2/3] Align demo UI, format and integration with build --- .github/workflows/cd.yaml | 1 + package.json | 8 ++- vuejs/.gitignore | 2 +- vuejs/package.json | 2 +- vuejs/src/App.vue | 122 +++++++++++++++++++++++++++----------- vuejs/src/jquery.js | 2 +- vuejs/src/main.js | 14 ++--- vuejs/vite.config.js | 9 ++- 8 files changed, 106 insertions(+), 54 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 06fc0e9..15c3f89 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -13,6 +13,7 @@ jobs: - run: npm install --legacy-peer-deps - run: npm --prefix=reactjs install --legacy-peer-deps - run: npm --prefix=nextjs install --legacy-peer-deps + - run: npm --prefix=vuejs install - run: npm run demo - uses: peaceiris/actions-gh-pages@v3 with: diff --git a/package.json b/package.json index 9e5ee42..6f513f6 100644 --- a/package.json +++ b/package.json @@ -6,18 +6,20 @@ "start.reactjs": "npm --prefix=reactjs start", "start.nextjs": "npm --prefix=nextjs start", "start": "reload --port 8080 --browser --dir .", - "lint.js": "eslint --ext js .", + "lint.js": "eslint --ext js \"*.js\"", "lint.css": "stylelint \"*.css\"", "lint.md": "markdownlint \"*.md\"", - "lint.prettier": "prettier --check \"**/*.js\"", + "lint.prettier": "prettier --check \"*.js\"", "lint": "run-s lint.js lint.css lint.md lint.prettier", "demo.vanillajs": "shx cp index.{html,js,css} mathquill4quill.{js,css} demo", "demo.reactjs": "npm --prefix=reactjs run build", "demo.nextjs": "npm --prefix=nextjs run build", + "demo.vuejs": "npm --prefix=vuejs run build", "postdemo.reactjs": "shx mv reactjs/build demo/reactjs", "postdemo.nextjs": "shx mv nextjs/out demo/nextjs", + "postdemo.vuejs": "shx mv vuejs/dist demo/vuejs", "predemo": "shx mkdir -p demo", - "demo": "run-s demo.vanillajs demo.reactjs demo.nextjs", + "demo": "run-s demo.vanillajs demo.reactjs demo.nextjs demo.vuejs", "prebuild": "shx mkdir -p build", "build.babel": "babel mathquill4quill.js > build/mathquill4quill.js", "build.uglify": "uglifyjs --compress --mangle -- build/mathquill4quill.js > build/mathquill4quill.min.js", diff --git a/vuejs/.gitignore b/vuejs/.gitignore index c20018b..82b59d1 100644 --- a/vuejs/.gitignore +++ b/vuejs/.gitignore @@ -22,4 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? -.vscode/ \ No newline at end of file +.vscode/ diff --git a/vuejs/package.json b/vuejs/package.json index ebb6ea5..0478b0e 100644 --- a/vuejs/package.json +++ b/vuejs/package.json @@ -1,5 +1,5 @@ { - "name": "rvuejs", + "name": "vuejs", "private": true, "version": "0.0.0", "type": "module", diff --git a/vuejs/src/App.vue b/vuejs/src/App.vue index 6f9fc44..1299ec0 100644 --- a/vuejs/src/App.vue +++ b/vuejs/src/App.vue @@ -1,39 +1,37 @@ \ No newline at end of file + diff --git a/vuejs/src/jquery.js b/vuejs/src/jquery.js index 1c2e771..d37a9fb 100644 --- a/vuejs/src/jquery.js +++ b/vuejs/src/jquery.js @@ -1,3 +1,3 @@ -import $ from 'jquery'; +import $ from "jquery"; window.jQuery = window.$ = $; diff --git a/vuejs/src/main.js b/vuejs/src/main.js index 1c6f0da..c4866a6 100644 --- a/vuejs/src/main.js +++ b/vuejs/src/main.js @@ -1,10 +1,10 @@ -import { createApp } from 'vue' -import 'katex/dist/katex.css'; -import '@vueup/vue-quill/dist/vue-quill.bubble.css'; -import '@vueup/vue-quill/dist/vue-quill.snow.css'; +import { createApp } from "vue"; +import "katex/dist/katex.css"; +import "@vueup/vue-quill/dist/vue-quill.bubble.css"; +import "@vueup/vue-quill/dist/vue-quill.snow.css"; -import 'mathquill4quill/mathquill4quill.css'; +import "mathquill4quill/mathquill4quill.css"; -import App from './App.vue' +import App from "./App.vue"; -createApp(App).mount('#app') +createApp(App).mount("#app"); diff --git a/vuejs/vite.config.js b/vuejs/vite.config.js index 05c1740..4f27720 100644 --- a/vuejs/vite.config.js +++ b/vuejs/vite.config.js @@ -1,7 +1,6 @@ -import { defineConfig } from 'vite' -import vue from '@vitejs/plugin-vue' +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; -// https://vitejs.dev/config/ export default defineConfig({ - plugins: [vue()], -}) + plugins: [vue()] +}); From 4e72e45e8bab5a097c0ec018e6a0256e9aa43a82 Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Wed, 4 Oct 2023 20:05:33 +0200 Subject: [PATCH 3/3] Fix tests --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6f513f6..fcf5f54 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "@babel/cli": "^7.5.5", "@babel/core": "^7.5.5", "@babel/preset-env": "^7.5.5", - "chromedriver": "^106.0.0", + "chromedriver": "^117.0.0", "concurrently": "^4.1.1", "csso-cli": "^3.0.0", "eslint": "^7.11.0",