From 7ba638268bbf081c140daa1552ebc51bf5e2e463 Mon Sep 17 00:00:00 2001 From: "Lucas.Xu" <lucas.xu@appflowy.io> Date: Thu, 1 Dec 2022 09:47:28 +0800 Subject: [PATCH] feat: init appflowy editor plugins --- .../appflowy_editor_plugins/.gitignore | 30 +++++++++++ .../appflowy_editor_plugins/.metadata | 10 ++++ .../appflowy_editor_plugins/CHANGELOG.md | 3 ++ .../packages/appflowy_editor_plugins/LICENSE | 1 + .../appflowy_editor_plugins/README.md | 39 ++++++++++++++ .../analysis_options.yaml | 4 ++ .../lib/appflowy_editor_plugins.dart | 7 +++ .../appflowy_editor_plugins/pubspec.yaml | 54 +++++++++++++++++++ .../test/appflowy_editor_plugins_test.dart | 12 +++++ 9 files changed, 160 insertions(+) create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/.gitignore create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/.metadata create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/CHANGELOG.md create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/LICENSE create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/README.md create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/analysis_options.yaml create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dart create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml create mode 100644 frontend/app_flowy/packages/appflowy_editor_plugins/test/appflowy_editor_plugins_test.dart diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/.gitignore b/frontend/app_flowy/packages/appflowy_editor_plugins/.gitignore new file mode 100644 index 0000000000..96486fd930 --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/.gitignore @@ -0,0 +1,30 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. +/pubspec.lock +**/doc/api/ +.dart_tool/ +.packages +build/ diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/.metadata b/frontend/app_flowy/packages/appflowy_editor_plugins/.metadata new file mode 100644 index 0000000000..d0b84561d4 --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/.metadata @@ -0,0 +1,10 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: f1875d570e39de09040c8f79aa13cc56baab8db1 + channel: unknown + +project_type: package diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/CHANGELOG.md b/frontend/app_flowy/packages/appflowy_editor_plugins/CHANGELOG.md new file mode 100644 index 0000000000..41cc7d8192 --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/CHANGELOG.md @@ -0,0 +1,3 @@ +## 0.0.1 + +* TODO: Describe initial release. diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/LICENSE b/frontend/app_flowy/packages/appflowy_editor_plugins/LICENSE new file mode 100644 index 0000000000..ba75c69f7f --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/LICENSE @@ -0,0 +1 @@ +TODO: Add your license here. diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/README.md b/frontend/app_flowy/packages/appflowy_editor_plugins/README.md new file mode 100644 index 0000000000..8b55e735b5 --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/README.md @@ -0,0 +1,39 @@ +<!-- +This README describes the package. If you publish this package to pub.dev, +this README's contents appear on the landing page for your package. + +For information about how to write a good package README, see the guide for +[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). + +For general information about developing packages, see the Dart guide for +[creating packages](https://dart.dev/guides/libraries/create-library-packages) +and the Flutter guide for +[developing packages and plugins](https://flutter.dev/developing-packages). +--> + +TODO: Put a short description of the package here that helps potential users +know whether this package might be useful for them. + +## Features + +TODO: List what your package can do. Maybe include images, gifs, or videos. + +## Getting started + +TODO: List prerequisites and provide or point to information on how to +start using the package. + +## Usage + +TODO: Include short and useful examples for package users. Add longer examples +to `/example` folder. + +```dart +const like = 'sample'; +``` + +## Additional information + +TODO: Tell users more about the package: where to find more information, how to +contribute to the package, how to file issues, what response they can expect +from the package authors, and more. diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/analysis_options.yaml b/frontend/app_flowy/packages/appflowy_editor_plugins/analysis_options.yaml new file mode 100644 index 0000000000..a5744c1cfb --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/analysis_options.yaml @@ -0,0 +1,4 @@ +include: package:flutter_lints/flutter.yaml + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dart new file mode 100644 index 0000000000..2755e2f2a3 --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/lib/appflowy_editor_plugins.dart @@ -0,0 +1,7 @@ +library appflowy_editor_plugins; + +/// A Calculator. +class Calculator { + /// Returns [value] plus 1. + int addOne(int value) => value + 1; +} diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml b/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml new file mode 100644 index 0000000000..09b3c9813f --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/pubspec.yaml @@ -0,0 +1,54 @@ +name: appflowy_editor_plugins +description: A new Flutter package project. +version: 0.0.1 +homepage: + +environment: + sdk: ">=2.17.6 <3.0.0" + flutter: ">=1.17.0" + +dependencies: + flutter: + sdk: flutter + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + +# For information on the generic Dart part of this file, see the +# following page: https://dart.dev/tools/pub/pubspec + +# The following section is specific to Flutter packages. +flutter: + + # To add assets to your package, add an assets section, like this: + # assets: + # - images/a_dot_burr.jpeg + # - images/a_dot_ham.jpeg + # + # For details regarding assets in packages, see + # https://flutter.dev/assets-and-images/#from-packages + # + # An image asset can refer to one or more resolution-specific "variants", see + # https://flutter.dev/assets-and-images/#resolution-aware + + # To add custom fonts to your package, add a fonts section here, + # in this "flutter" section. Each entry in this list should have a + # "family" key with the font family name, and a "fonts" key with a + # list giving the asset and other descriptors for the font. For + # example: + # fonts: + # - family: Schyler + # fonts: + # - asset: fonts/Schyler-Regular.ttf + # - asset: fonts/Schyler-Italic.ttf + # style: italic + # - family: Trajan Pro + # fonts: + # - asset: fonts/TrajanPro.ttf + # - asset: fonts/TrajanPro_Bold.ttf + # weight: 700 + # + # For details regarding fonts in packages, see + # https://flutter.dev/custom-fonts/#from-packages diff --git a/frontend/app_flowy/packages/appflowy_editor_plugins/test/appflowy_editor_plugins_test.dart b/frontend/app_flowy/packages/appflowy_editor_plugins/test/appflowy_editor_plugins_test.dart new file mode 100644 index 0000000000..28c3d5a539 --- /dev/null +++ b/frontend/app_flowy/packages/appflowy_editor_plugins/test/appflowy_editor_plugins_test.dart @@ -0,0 +1,12 @@ +import 'package:flutter_test/flutter_test.dart'; + +import 'package:appflowy_editor_plugins/appflowy_editor_plugins.dart'; + +void main() { + test('adds one to input values', () { + final calculator = Calculator(); + expect(calculator.addOne(2), 3); + expect(calculator.addOne(-7), -6); + expect(calculator.addOne(0), 1); + }); +}