diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..08356c32 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,53 @@ +/* eslint-disable no-undef */ +module.exports = { + env: { + browser: true, + es2021: true, + }, + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:vue/vue3-recommended', + ], + parserOptions: { + ecmaVersion: 12, + parser: '@typescript-eslint/parser', + sourceType: 'module', + }, + plugins: ['vue', '@typescript-eslint'], + ignorePatterns: ['docs', 'temp', '**/shims-vue.d.ts'], + rules: { + '@typescript-eslint/ban-types': 'off', + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', + }, + overrides: [ + { + files: ['**/__tests__/**', 'test-dts/**'], + rules: { + 'no-restricted-globals': 'off', + 'no-restricted-syntax': 'off', + }, + }, + { + files: ['packages/*/src/**/*.ts'], + rules: { + quotes: ['error', 'single'], + 'vue/require-default-prop': 'off', + '@typescript-eslint/ban-ts-comment': 'off', + }, + }, + { + files: ['scripts/**/*.ts', '*.ts', '*.js'], + rules: { + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-empty-function': 'off', + '@typescript-eslint/no-extra-semi': 'off', + }, + env: { + node: true, + commonjs: true, + }, + }, + ], +} diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 87cd25c5..f17b97e8 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,4 @@ # github: [luthfimasruri] +patreon: luthfimasruri custom: ["buymeacoffee.com/luthfimasruri"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..6d4750bd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Version** +@vueup/vue-quill version [e.g. 1.0.0-beta.5] + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Reproduction link** +If available, add a link to the source code to help explain your problem. + +**Browser (please complete the following information):** + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 00000000..d9f65632 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false \ No newline at end of file diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 120178be..fa23e0e5 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -4,6 +4,8 @@ on: push: branches: - master + - beta + - alpha paths: - 'docs/**' @@ -12,16 +14,21 @@ jobs: name: Build and deploy runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: '14.x' - run: npm ci + - working-directory: packages/vue-quill + run: npm ci - name: Build docs working-directory: docs run: | npm ci npm run build + env: + ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }} + ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }} - name: Deploy docs uses: peaceiris/actions-gh-pages@v3.7.3 with: diff --git a/.github/workflows/release-package.yml b/.github/workflows/release-package.yml deleted file mode 100644 index 29ae2355..00000000 --- a/.github/workflows/release-package.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Release package - -on: - push: - branches: - - alpha - - beta - - master - paths-ignore: - - 'docs/**' - - 'scripts/**' - - '**/README.md' - - '**/.gitignore' - - '.github/*.yml' - -jobs: - release: - name: Build and release - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@master - - uses: actions/setup-node@v1 - with: - node-version: '14.x' - - name: Build package - run: | - npm ci - npm run theme:build - npm run lib:build - - name: Release package - run: npx semantic-release - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/release-vue-quill.yml b/.github/workflows/release-vue-quill.yml new file mode 100644 index 00000000..e19fc25a --- /dev/null +++ b/.github/workflows/release-vue-quill.yml @@ -0,0 +1,30 @@ +name: Release @vueup/vue-quill + +on: + push: + branches: + - alpha + - beta + - master + paths: + - 'packages/vue-quill/**' +jobs: + release: + name: Build and release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: '14.x' + - name: Install root deps + run: npm ci + - name: Install package deps + working-directory: packages/vue-quill + run: npm ci + - name: Release package + working-directory: packages/vue-quill + run: npx ts-node ../../scripts/release.ts vue-quill + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index f95a7fe3..5e1d427c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ -node_modules -.DS_Store -.debug dist -dist-ssr -*.local -dummy/assets -src/themes/css +.DS_Store +node_modules +coverage +temp +explorations +TODOs.md +*.log +.env +.nuxt diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..2c2c282d --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "semi": false, + "singleQuote": true, + "printWidth": 80 +} diff --git a/.releaserc.json b/.releaserc.json deleted file mode 100644 index 239d8fb0..00000000 --- a/.releaserc.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "branches": ["master", "next"], - "plugins": [ - "@semantic-release/commit-analyzer", - "@semantic-release/release-notes-generator", - "@semantic-release/npm", - ["@semantic-release/exec", { - "prepareCmd": "zip vue-quill-dist.zip -r dist" - }], - ["@semantic-release/github", { - "assets": [ - { - "path": "vue-quill-dist.zip", - "name": "vue-quill-dist-${nextRelease.gitTag}.zip", - "label": "Distribution code (zip)" - } - ] - }] - ] -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..b63ffc79 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,28 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Jest", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/node_modules/.bin/jest", + "stopOnEntry": false, + "args": ["${fileBasename}", "--runInBand", "--detectOpenHandles"], + "cwd": "${workspaceFolder}", + "preLaunchTask": null, + "runtimeExecutable": null, + "runtimeArgs": ["--nolazy"], + "env": { + "NODE_ENV": "development" + }, + "console": "integratedTerminal", + "sourceMaps": true, + "windows": { + "program": "${workspaceFolder}/node_modules/jest/bin/jest", + } + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..25b15a53 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + // Use the project's typescript version + "typescript.tsdk": "node_modules/typescript/lib", + + "cSpell.enabledLanguageIds": ["markdown", "plaintext", "text", "yml"], + + // Use prettier to format typescript, javascript and JSON files + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[json]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "conventionalCommits.scopes": [ + "docs" + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..1dbe42ca --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,7 @@ +# [1.0.0-beta.8](https://github.com/vueup/vue-quill/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2022-02-17) + + +### Bug Fixes + +* :bug: remove unsupported workspaces (semantic-release) ([10a552b](https://github.com/vueup/vue-quill/commit/10a552b79fdda00b1e81f9795232d665f2805cd1)) +* try to fix semantic-release/npm ([3cc858a](https://github.com/vueup/vue-quill/commit/3cc858ab5c10da7539a05bdd512d17907bc32f83)) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..18c91471 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..ed801969 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021-present, Ahmad Luthfi Masruri + +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/README.md b/README.md index 33002c1c..318e1781 100644 --- a/README.md +++ b/README.md @@ -5,59 +5,70 @@
+
+
+
+
+ 👀 See a Live Demo
+