diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..0a7dc88 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +**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. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment(please complete the following information):** +Please use `flutter doctor -v` to show your flutter environment, and add your `markdown_widget` version too + +**Platform** +Does the problem appear on the **Web** or on the **Mobile**? + +**Source data** +Please provide a minimal source data that can help locating the problem \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11fc491 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/build_releases.yml b/.github/workflows/build_releases.yml new file mode 100644 index 0000000..e74131d --- /dev/null +++ b/.github/workflows/build_releases.yml @@ -0,0 +1,105 @@ +name: Build & Deploy + +on: + push: + tags: + - 'v*' + +jobs: + build-and-release-linux: + runs-on: ubuntu-22.04 + if: startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + architecture: x64 + flutter-version: '3.16.5' + - name: Install dependencies + run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-0 libgtk-3-dev libblkid1 liblzma5 + - name: Install project dependencies + run: flutter pub get + - name: Generate intermediates + run: flutter pub run build_runner build --delete-conflicting-outputs + - name: Enable linux build + run: flutter config --enable-linux-desktop + - name: Build artifacts + run: flutter build linux --release + - name: Archive Release + uses: thedoctor0/zip-release@master + with: + type: 'zip' + filename: markdown-${{github.ref_name}}-linux.zip + directory: build/linux/x64/release/bundle + - name: Linux Release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + with: + files: build/linux/x64/release/bundle/markdown-${{github.ref_name}}-linux.zip + + build-and-release-windows: + runs-on: windows-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + architecture: x64 + flutter-version: '3.16.5' + - name: Install project dependencies + run: flutter pub get + - name: Generate intermediates + run: flutter pub run build_runner build --delete-conflicting-outputs + - name: Enable windows build + run: flutter config --enable-windows-desktop + - name: Build artifacts + run: flutter build windows --release + - name: Archive Release + uses: thedoctor0/zip-release@master + with: + type: 'zip' + filename: markdown-${{github.ref_name}}-windows.zip + directory: build/windows/runner/Release + - name: Windows Release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + with: + files: build/windows/runner/Release/markdown-${{github.ref_name}}-windows.zip + + build-and-release-macos: + runs-on: macos-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - uses: actions/checkout@v2 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + architecture: x64 + flutter-version: '3.16.5' + - name: Install project dependencies + run: flutter pub get + - name: Generate intermediates + run: flutter pub run build_runner build --delete-conflicting-outputs + - name: Enable macOS build + run: flutter config --enable-macos-desktop + - name: Build artifacts + run: flutter build macos --release + - name: Archive Release + uses: thedoctor0/zip-release@master + with: + type: 'zip' + filename: markdown-${{github.ref_name}}-macos.zip + directory: build/macos/Build/Products/Release + - name: macOS Release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} + with: + files: build/macos/Build/Products/Release/markdown-${{github.ref_name}}-macos.zip \ No newline at end of file diff --git a/.github/workflows/build_web.yml b/.github/workflows/build_web.yml new file mode 100644 index 0000000..a5013dd --- /dev/null +++ b/.github/workflows/build_web.yml @@ -0,0 +1,61 @@ +name: Build & Deploy Web + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Flutter + uses: subosito/flutter-action@v1 + with: + channel: 'stable' + flutter-version: '3.16.5' + + + - name: Get dependencies + run: flutter pub get + + - name: Test project + run: flutter test + + - name: Build release project + run: flutter build web + + - name: Show dir + run: ls + + - name: Upload production-ready build files + uses: actions/upload-artifact@v2 + with: + name: production-files + path: build/web + + deploy: + name: Deploy + needs: build + runs-on: ubuntu-latest + + steps: + - name: Download artifact + uses: actions/download-artifact@v2 + with: + name: production-files + path: build/web + + - name: Deploy to gh-pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.ACTION_TOKEN }} + publish_dir: build/web diff --git a/.github/workflows/coverage_action.yml b/.github/workflows/coverage_action.yml new file mode 100644 index 0000000..9f120e1 --- /dev/null +++ b/.github/workflows/coverage_action.yml @@ -0,0 +1,23 @@ +name: Test Coveralls + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: subosito/flutter-action@v1 + with: + channel: 'stable' + flutter-version: '3.16.5' + - run: flutter pub get + - run: flutter packages pub run build_runner build + - run: flutter test --coverage ./test/ + - uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: coverage/lcov.info \ No newline at end of file diff --git a/README.md b/README.md index afaf245..3f0daa7 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Languages : [English](https://github.com/morn-fun/crayon/blob/main/README_EN.md) | [にほんご](https://github.com/morn-fun/crayon/blob/main/README_JA.md) | [한국어](https://github.com/morn-fun/crayon/blob/main/README_KO.md) +[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main) + ![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da) ## 当前支持功能 diff --git a/README_EN.md b/README_EN.md index 9e2abec..8a6791b 100644 --- a/README_EN.md +++ b/README_EN.md @@ -6,6 +6,8 @@ A rich text editor implemented based on Flutter. Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [にほんご](https://github.com/morn-fun/crayon/blob/main/README_JA.md) | [한국어](https://github.com/morn-fun/crayon/blob/main/README_KO.md) +[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main) + ![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da) ## Current supported features diff --git a/README_JA.md b/README_JA.md index b42d769..8b50a6b 100644 --- a/README_JA.md +++ b/README_JA.md @@ -6,6 +6,8 @@ Flutterで実装されたリッチテキストエディタです。 Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [English](https://github.com/morn-fun/crayon/blob/main/README_EN.md) | [한국어](https://github.com/morn-fun/crayon/blob/main/README_KO.md) +[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main) + ![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da) ## 現在サポートされている機能 diff --git a/README_KO.md b/README_KO.md index 51976e2..2d10b9d 100644 --- a/README_KO.md +++ b/README_KO.md @@ -6,6 +6,8 @@ Flutter 기반으로 구현된 리치 텍스트 편집기입니다. Languages : [中文](https://github.com/morn-fun/crayon/blob/main/README.md) | [English](https://github.com/morn-fun/crayon/blob/main/README_EN.md) | [にほんご](https://github.com/morn-fun/crayon/blob/main/README_JA.md) +[![Coverage Status](https://coveralls.io/repos/github/morn-fun/crayon/badge.svg?branch=main)](https://coveralls.io/github/morn-fun/crayon?branch=main) + ![screenshot](https://github.com/asjqkkkk/asjqkkkk.github.io/assets/30992818/c952af3d-a5d6-4fa7-a625-d0ea0a0451da) ## 현재 지원되는 기능 diff --git a/pubspec.lock b/pubspec.lock index b7f9ef4..c6b4dff 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,30 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: eb376e9acf6938204f90eb3b1f00b578640d3188b4c8a8ec054f9f479af8d051 + url: "https://pub.dev" + source: hosted + version: "64.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "69f54f967773f6c26c7dcb13e93d7ccee8b17a641689da39e878d5cf13b06893" + url: "https://pub.dev" + source: hosted + version: "6.2.0" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" async: dependency: transitive description: @@ -17,6 +41,70 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + url: "https://pub.dev" + source: hosted + version: "2.4.9" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" characters: dependency: transitive description: @@ -25,6 +113,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" clock: dependency: transitive description: @@ -33,14 +129,30 @@ packages: url: "https://pub.dev" source: hosted version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + url: "https://pub.dev" + source: hosted + version: "1.17.2" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "3.1.1" crypto: dependency: transitive description: @@ -57,6 +169,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" fake_async: dependency: transitive description: @@ -65,6 +185,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -96,6 +232,30 @@ packages: description: flutter source: sdk version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" highlight: dependency: "direct main" description: @@ -104,6 +264,22 @@ packages: url: "https://pub.dev" source: hosted version: "0.7.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" intl: dependency: "direct main" description: @@ -112,6 +288,30 @@ packages: url: "https://pub.dev" source: hosted version: "0.18.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" lints: dependency: "direct dev" description: @@ -120,6 +320,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" matcher: dependency: transitive description: @@ -140,10 +348,26 @@ packages: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.9.1" + mime: + dependency: transitive + description: + name: mime + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" + source: hosted + version: "1.0.4" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -152,6 +376,46 @@ packages: url: "https://pub.dev" source: hosted version: "1.8.3" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" sky_engine: dependency: transitive description: flutter @@ -177,18 +441,26 @@ packages: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.1" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -209,10 +481,18 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + url: "https://pub.dev" + source: hosted + version: "0.6.0" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "1.0.1" typed_data: dependency: transitive description: @@ -237,13 +517,37 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b + url: "https://pub.dev" + source: hosted + version: "2.4.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "3.1.2" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" + dart: ">=3.1.0 <4.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index 304b597..d2adf61 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -51,6 +51,7 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^2.0.0 lints: ^2.1.1 + build_runner: ^2.3.3 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec