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..fcf5f54 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", @@ -30,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", diff --git a/vuejs/.gitignore b/vuejs/.gitignore new file mode 100644 index 0000000..82b59d1 --- /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/ 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..0478b0e --- /dev/null +++ b/vuejs/package.json @@ -0,0 +1,23 @@ +{ + "name": "vuejs", + "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..1299ec0 --- /dev/null +++ b/vuejs/src/App.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/vuejs/src/jquery.js b/vuejs/src/jquery.js new file mode 100644 index 0000000..d37a9fb --- /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..c4866a6 --- /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..4f27720 --- /dev/null +++ b/vuejs/vite.config.js @@ -0,0 +1,6 @@ +import { defineConfig } from "vite"; +import vue from "@vitejs/plugin-vue"; + +export default defineConfig({ + plugins: [vue()] +});