From fb9ebc882f3df4e1dcdcc01431e2357934cf914f Mon Sep 17 00:00:00 2001 From: David Royer Date: Tue, 14 May 2019 09:21:50 -0400 Subject: [PATCH] feat(builds): now using bili.js & standard-version --- .browserslistrc | 2 + .editorconfig | 12 - .eslintignore | 2 + .eslintrc.js | 19 + .gitignore | 34 +- .release-it.json | 14 - .vscode/settings.json | 3 + README.md | 163 +- babel.config.js | 4 + bili.config.js | 50 + commitlint.config.js | 3 + dev/App.vue | 38 +- dev/index.js | 8 +- dev/router.js | 39 - dev/views/Basic.vue | 65 - dev/views/CustomModules.vue | 37 - dev/views/CustomToolbar.vue | 50 - dev/views/Customized.vue | 66 - dev/views/Dashboard.vue | 6 - dev/views/Images.vue | 62 - dev/views/Modules.vue | 35 - dev/views/SyntaxHighlighting.vue | 41 - dist/vue2-editor.cjs.js | 804 ++ dist/vue2-editor.esm.js | 796 ++ dist/vue2-editor.js | 6 + dist/vue2-editor.js.map | 1 + package-lock.json | 6531 --------------- package.json | 68 +- poi.config.js | 17 - src/{styles => assets}/md-toolbar.scss | 0 src/{styles => assets}/vue2-editor.scss | 0 src/{ => components}/VueEditor.vue | 63 +- src/helpers/default-toolbar.js | 0 src/helpers/fullToolbar.js | 35 +- src/helpers/markdown-shortcuts.js | 0 src/helpers/old-api.js | 0 src/index.js | 20 - src/lib.js | 32 + yarn.lock | 9959 ++++++++++++++--------- 39 files changed, 7993 insertions(+), 11092 deletions(-) create mode 100644 .browserslistrc delete mode 100644 .editorconfig create mode 100644 .eslintignore create mode 100644 .eslintrc.js mode change 100755 => 100644 .gitignore delete mode 100644 .release-it.json create mode 100644 .vscode/settings.json create mode 100644 babel.config.js create mode 100644 bili.config.js create mode 100644 commitlint.config.js delete mode 100644 dev/router.js delete mode 100644 dev/views/Basic.vue delete mode 100644 dev/views/CustomModules.vue delete mode 100644 dev/views/CustomToolbar.vue delete mode 100644 dev/views/Customized.vue delete mode 100644 dev/views/Dashboard.vue delete mode 100644 dev/views/Images.vue delete mode 100644 dev/views/Modules.vue delete mode 100644 dev/views/SyntaxHighlighting.vue create mode 100644 dist/vue2-editor.cjs.js create mode 100644 dist/vue2-editor.esm.js create mode 100644 dist/vue2-editor.js create mode 100644 dist/vue2-editor.js.map delete mode 100644 package-lock.json delete mode 100644 poi.config.js rename src/{styles => assets}/md-toolbar.scss (100%) mode change 100644 => 100755 rename src/{styles => assets}/vue2-editor.scss (100%) mode change 100644 => 100755 rename src/{ => components}/VueEditor.vue (87%) mode change 100644 => 100755 mode change 100644 => 100755 src/helpers/default-toolbar.js mode change 100644 => 100755 src/helpers/fullToolbar.js mode change 100644 => 100755 src/helpers/markdown-shortcuts.js mode change 100644 => 100755 src/helpers/old-api.js delete mode 100644 src/index.js create mode 100644 src/lib.js diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 0000000..d6471a3 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1,2 @@ +> 1% +last 2 versions diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index 4a7ea30..0000000 --- a/.editorconfig +++ /dev/null @@ -1,12 +0,0 @@ -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/.eslintignore b/.eslintignore new file mode 100644 index 0000000..246d599 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +/dist +/node_modules \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000..9ba57d3 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,19 @@ +module.exports = { + root: true, + env: { + node: true + }, + extends: ["plugin:vue/recommended", "plugin:vue/essential", "@vue/prettier"], + rules: { + "no-console": process.env.NODE_ENV === "production" ? "error" : "off", + "no-debugger": process.env.NODE_ENV === "production" ? "error" : "off" + }, + parserOptions: { + parser: "babel-eslint" + } +}; + + // "plugin:vue/recommended", + // "eslint:recommended", + // "prettier/vue", + // "plugin:prettier/recommended" \ No newline at end of file diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index a2222bb..b500932 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,25 @@ -.idea/ -node_modules/ -demo/ -.npmignore .DS_Store -npm-debug.log +node_modules +# /dist -*.log -**/**/.DS_Store +# local env files +.env.local +.env.*.local -# produced by vbuild -dist -dist-example +# Log files +npm-debug.log* +yarn-debug.log* +yarn-error.log* -dev/cloudinary.vue -dev/Backup-App.vue -NOTES.md +# Editor directories and files +.idea +# .vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? -.BACKUP +# Backups +# .BACKUP +.STORAGE \ No newline at end of file diff --git a/.release-it.json b/.release-it.json deleted file mode 100644 index b5da5a9..0000000 --- a/.release-it.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "non-interactive": true, - "pkgFiles": ["package.json"], - "increment": "conventional:angular", - "beforeChangelogCommand": "conventional-changelog -p angular -i CHANGELOG.md -s", - "changelogCommand": "conventional-changelog -p angular | tail -n +3", - "safeBump": false, - "requireUpstream": false, - "github": { - "release": true, - "tokenRef": "GITHUB_TOKEN" - }, - "buildCommand": "npm run build" -} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..34dd62e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "vetur.validation.template": false +} \ No newline at end of file diff --git a/README.md b/README.md index 59fa2c5..abbed2c 100644 --- a/README.md +++ b/README.md @@ -62,27 +62,26 @@ import { VueEditor, Quill } from "vue2-editor"; ```html - - + }, + + data() { + return { + content: "

Some initial content

" + }; + } + }; + ``` ## Example - Custom Image Handler @@ -90,25 +89,22 @@ import { VueEditor, Quill } from "vue2-editor"; If you choose to use the custom image handler, an event is emitted when a a photo is selected. You can see below that 3 parameters are passed. -1. It passes the file to be handled however you need -2. The Editor instance -3. The cursor position at the time of upload so the image can be inserted at the correct position on success +1. It passes the file to be handled however you need +2. The Editor instance +3. The cursor position at the time of upload so the image can be inserted at the correct position on success **NOTE** In addition to this example, I have created a [ example repo](https://github.com/davidroyer/vue2editor-images) demonstrating this new feature with an actual server. ```html ``` @@ -159,7 +155,7 @@ You can see below that 3 parameters are passed. ``` @@ -192,7 +188,7 @@ You can see below that 3 parameters are passed. @@ -225,7 +222,7 @@ You can see below that 3 parameters are passed. ``` @@ -257,26 +254,26 @@ You can see below that 3 parameters are passed. ``` @@ -315,10 +312,10 @@ There are 2 ways of using custom modules with Vue2Editor. This is partly because Vue2Editor now exports Quill to assist in this process. -1. When importing VueEditor, also import Quill. -2. Import your custom modules -3. Register the custom modules with Quill -4. Add the necessary configuration to the `editorOptions` object +1. When importing VueEditor, also import Quill. +2. Import your custom modules +3. Register the custom modules with Quill +4. Add the necessary configuration to the `editorOptions` object ```html