diff --git a/README.md b/README.md index 7f591827..cc0dce6f 100644 --- a/README.md +++ b/README.md @@ -395,22 +395,7 @@ Visit localhost:7001 after startup ### Vue -Just enter the examples/vue directory to install the dependencies - -```base -//After the dependencies are installed, execute the following commands in the examples/vue directory - -yarn serve -``` - -In the Vue runtime environment, the default is the installed code that has been published to npm. If you need to modify the code of the engine or plug-in and see the effect immediately, we need to do the following steps: - -- Delete the examples/vue/node_modules/@aomao folder -- Delete the examples/vue/node_modules/vue folder. Because there are plugins that depend on Vue, the Vue package will be installed in the project root directory. If you do not delete the Vue package in examples/vue, and the Vue package of the plugin is not in the same environment, the plugin cannot be loaded -- Execute and install all dependent commands in the root directory of am-editor, for example: `yarn` -- Finally restart in examples/vue - -No back-end API is configured in the `Vue` case. For details, please refer to `React` and `api` to set reverse proxy +[am-editor vue example](https://github.com/byoungd/am-editor-vue) > Vue example powered by [**modern-vue-template**](https://github.com/byoungd/modern-vue-template) ## Contribution diff --git a/README.zh-CN.md b/README.zh-CN.md index d43e43a1..fccc31a8 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -415,22 +415,7 @@ yarn start ### Vue -只需要进入 examples/vue 目录安装依赖 - -```base -//依赖安装好后,在 examples/vue 目录执行以下命令 - -yarn serve -``` - -在 Vue 运行环境中,默认是安装的已发布到 npm 上的代码。如果需要修改引擎或者插件的代码后立即看到效果,我们需要做以下步骤: - -- 删除 examples/vue/node_modules/@aomao 文件夹 -- 删除 examples/vue/node_modules/vue 文件夹。因为有插件依赖了 Vue,所以 Vue 的包会在项目根目录中安装。如果不删除 examples/vue 中的 Vue 包,和插件的 Vue 包不在一个环境中,就无法加载插件 -- 在 am-editor 根目录下执行安装所有依赖命令,例如:`yarn` -- 最后在 examples/vue 中重新启动 - -`Vue` 案例中没有配置任何后端 API,具体可以参考 `React` 和 `api` 设置反向代理 +[am-editor vue example](https://github.com/byoungd/am-editor-vue/blob/main/README.zh-CN.md) ## 贡献 diff --git a/examples/vue/.browserslistrc b/examples/vue/.browserslistrc deleted file mode 100644 index 214388fe..00000000 --- a/examples/vue/.browserslistrc +++ /dev/null @@ -1,3 +0,0 @@ -> 1% -last 2 versions -not dead diff --git a/examples/vue/.commitlintrc.js b/examples/vue/.commitlintrc.js deleted file mode 100644 index 4032119a..00000000 --- a/examples/vue/.commitlintrc.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - extends: ['cz'], -} diff --git a/examples/vue/.cz-config.js b/examples/vue/.cz-config.js deleted file mode 100644 index 7d6fdf69..00000000 --- a/examples/vue/.cz-config.js +++ /dev/null @@ -1,33 +0,0 @@ -module.exports = { - types: [ - { value: 'feat', name: 'feat: 增加新功能' }, - { value: 'fix', name: 'fix: 修复bug' }, - { value: 'ui', name: 'ui: 更新UI' }, - { value: 'refactor', name: 'refactor: 代码重构' }, - { value: 'release', name: 'release: 发布' }, - { value: 'deploy', name: 'deploy: 部署' }, - { value: 'docs', name: 'docs: 修改文档' }, - { value: 'test', name: 'test: 增删测试' }, - { value: 'chore', name: 'chore: 更改配置文件' }, - { value: 'style', name: 'style: 样式修改不影响逻辑' }, - { value: 'revert', name: 'revert: 版本回退' }, - { value: 'add', name: 'add: 添加依赖' }, - { value: 'minus', name: 'minus: 版本回退' }, - { value: 'del', name: 'del: 删除代码/文件' }, - { value: 'init', name: 'init: 初始提交' }, - ], - scopes: [], - messages: { - type: '选择更改类型:\n', - scope: '更改的范围:\n', - // 如果allowcustomscopes为true,则使用 - // customScope: 'Denote the SCOPE of this change:', - subject: '简短描述:\n', - body: '详细描述. 使用"|"换行:\n', - breaking: 'Breaking Changes列表:\n', - footer: '关闭的issues列表. E.g.: #31, #34:\n', - confirmCommit: '确认提交?', - }, - allowCustomScopes: true, - allowBreakingChanges: ['feat', 'fix'], -} diff --git a/examples/vue/.editorconfig b/examples/vue/.editorconfig deleted file mode 100644 index 5d126348..00000000 --- a/examples/vue/.editorconfig +++ /dev/null @@ -1,13 +0,0 @@ -# editorconfig.org -root = true - -[*] -indent_style = space -indent_size = 2 -end_of_line = lf -charset = utf-8 -trim_trailing_whitespace = true -insert_final_newline = true - -[*.md] -trim_trailing_whitespace = false diff --git a/examples/vue/.env.development b/examples/vue/.env.development deleted file mode 100644 index 1c984373..00000000 --- a/examples/vue/.env.development +++ /dev/null @@ -1,16 +0,0 @@ -# server env -VITE_SERVER_ENV = 'development' - -# open dev login -VITE_OPEN_DEV_LOGIN = 'YES' - -# drop console -VITE_BUILD_DROP_CONSOLE = 'NO' - -# base api -VITE_BASE_API = 'https://api.xxx.com' - -# Versions -VITE_VER_MAIN = '1' -VITE_VER_SUB = '0.0.1' -VITE_VER_STATE = 'dev' diff --git a/examples/vue/.env.production b/examples/vue/.env.production deleted file mode 100644 index b017391b..00000000 --- a/examples/vue/.env.production +++ /dev/null @@ -1,16 +0,0 @@ -# server env -VITE_SERVER_ENV = 'production' - -# open dev login -VITE_OPEN_DEV_LOGIN = 'NO' - -# drop console -VITE_BUILD_DROP_CONSOLE = 'YES' - -# base api -VITE_BASE_API = 'https://api.xxx.com' - -# Versions -VITE_VER_MAIN = '1' -VITE_VER_SUB = '0.0.1' -VITE_VER_STATE = 'prod' diff --git a/examples/vue/.env.test b/examples/vue/.env.test deleted file mode 100644 index 1ced4540..00000000 --- a/examples/vue/.env.test +++ /dev/null @@ -1,16 +0,0 @@ -# server env -VITE_SERVER_ENV = 'production' - -# open dev login -VITE_OPEN_DEV_LOGIN = 'YES' - -# drop console -VITE_BUILD_DROP_CONSOLE = 'NO' - -# base api -VITE_BASE_API = 'https://api.xxx.com' - -# Versions -VITE_VER_MAIN = '1' -VITE_VER_SUB = '0.0.1' -VITE_VER_STATE = 'prod' diff --git a/examples/vue/.eslintignore b/examples/vue/.eslintignore deleted file mode 100644 index 9e0d7b2b..00000000 --- a/examples/vue/.eslintignore +++ /dev/null @@ -1,17 +0,0 @@ -node_modules -public -apps/modern-vue/dist -apps/modern-vue/build -.build/* -.nuxt -.history -apps/modern-vue/static/* -apps/modern-vue/static/js -apps/modern-vue/static/sw.js -apps/modern-vue/static/pdf -apps/modern-vue/static/simple-project -jsconfig.json -package.json -package-lock.json -yarn.lock -types/generated/* diff --git a/examples/vue/.eslintrc.js b/examples/vue/.eslintrc.js deleted file mode 100644 index d538cb97..00000000 --- a/examples/vue/.eslintrc.js +++ /dev/null @@ -1,31 +0,0 @@ -module.exports = { - root: true, - env: { - node: true, - browser: true, - }, - extends: [ - 'eslint:recommended', - 'plugin:vue/vue3-essential', - 'plugin:vue/vue3-strongly-recommended', - '@vue/typescript/recommended', - '@vue/eslint-config-prettier', - '@vue/eslint-config-typescript', - 'prettier', - ], - parserOptions: { - ecmaVersion: 2020, - }, - plugins: ['vue', 'prettier'], - // add your custom rules here - rules: { - 'prettier/prettier': [ - 'error', - {}, - { - usePrettierrc: true, - }, - ], - '@typescript-eslint/ban-ts-comment': 'off', - }, -} diff --git a/examples/vue/.gitattributes b/examples/vue/.gitattributes deleted file mode 100644 index 79a85db5..00000000 --- a/examples/vue/.gitattributes +++ /dev/null @@ -1,14 +0,0 @@ -# Don't allow people to merge changes to these generated files, because the result -# may be invalid. You need to run "rush update" again. -pnpm-lock.yaml merge=text -shrinkwrap.yaml merge=binary -npm-shrinkwrap.json merge=binary -yarn.lock merge=binary - -# Rush's JSON config files use JavaScript-style code comments. The rule below prevents pedantic -# syntax highlighters such as GitHub's from highlighting these comments as errors. Your text editor -# may also require a special configuration to allow comments in JSON. -# -# For more information, see this issue: https://github.com/microsoft/rushstack/issues/1088 -# -*.json linguist-language=JSON-with-Comments diff --git a/examples/vue/.gitignore b/examples/vue/.gitignore deleted file mode 100644 index aa9c8253..00000000 --- a/examples/vue/.gitignore +++ /dev/null @@ -1,111 +0,0 @@ -# Logs -logs -*.log -.DS_Store -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# TypeScript v1 declaration files -typings/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - -# parcel-bundler cache (https://parceljs.org/) -.cache - -# Next.js build output -.next - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and *not* Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -build -.vite-ssg-temp - -# gen -src/auto-imports.d.ts -src/components.d.ts diff --git a/examples/vue/.prettierrc b/examples/vue/.prettierrc deleted file mode 100644 index d2e14bcc..00000000 --- a/examples/vue/.prettierrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "printWidth": 90, - "semi": false, - "singleQuote": true, - "tabWidth": 2, - "trailingComma": "es5", - "proseWrap": "always", - "endOfLine": "auto", - "bracketSpacing": true -} diff --git a/examples/vue/LICENSE b/examples/vue/LICENSE deleted file mode 100644 index 6153da10..00000000 --- a/examples/vue/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 han - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/examples/vue/README.md b/examples/vue/README.md index 9298c414..47a70064 100644 --- a/examples/vue/README.md +++ b/examples/vue/README.md @@ -1,194 +1,3 @@ -## Modern Vue +# example of Vue -[Modern Vue](https://github.com/byoungd/modern-vue-template) stack 2022 with **Micro front -end** & **Monorepo** 🎉. - -Joyful development experience 😄. - -The `main` branch will keep clean for quickly creating Vue3 web app. - -Monorepo architecture please visit branch -[monorepo](https://github.com/byoungd/modern-vue-template/tree/monorepo). - -
-English | 简体中文 -
- -## Features - -- ⚡️ [Vue 3](https://github.com/vuejs/vue-next), - [Vite 2](https://github.com/vitejs/vite), [pnpm](https://pnpm.js.org/), - [ESBuild](https://github.com/evanw/esbuild) - born with fastness - -- ⚡️ Build Optimization with compress - -- ⚡️ CDN by Uploading static files to OSS - -- 🦾 Environmental distinction - -- 🦾 **Monorepo** by Rush - -- 🎨 Commitlint - -- 🎨 Formatting with **prettier** and **pretty-quick** - -- 🗂 File based routing - -- 📦 Components auto importing - -- 🍍 [State Management via Pinia](https://pinia.esm.dev/) - -- 📑 Layout system - -- [Extend Script Setup Component Name to co-operate with Vue Devtools](https://github.com/vbenjs/vite-plugin-vue-setup-extend) - -- 📲 [PWA](https://github.com/antfu/vite-plugin-pwa) - -- 🎨 [Windi CSS](https://github.com/windicss/windicss) - next generation utility-first CSS - framework - -- 😃 - [Use icons from any icon sets, with no compromise](https://github.com/antfu/unplugin-icons) - -- 🌍 I18n ready - -- 🗒 [Markdown Support](https://github.com/antfu/vite-plugin-md) - -- 🔥 Use the [new ` - - - - - -