From c1437f133a3ec6c715b87ed572dc8c3ab1a41bd5 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Tue, 1 Jun 2021 19:41:14 +0700 Subject: [PATCH] init dart shared --- .gitignore | 10 ++++++++++ CHANGELOG.md | 3 +++ README.md | 19 +++++++++++++++++++ analysis_options.yaml | 16 ++++++++++++++++ example/cubetiq_dart_shared_example.dart | 6 ++++++ lib/cubetiq_dart_shared.dart | 8 ++++++++ lib/src/cubetiq_dart_shared_base.dart | 6 ++++++ pubspec.yaml | 14 ++++++++++++++ test/cubetiq_dart_shared_test.dart | 16 ++++++++++++++++ 9 files changed, 98 insertions(+) create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 README.md create mode 100644 analysis_options.yaml create mode 100644 example/cubetiq_dart_shared_example.dart create mode 100644 lib/cubetiq_dart_shared.dart create mode 100644 lib/src/cubetiq_dart_shared_base.dart create mode 100644 pubspec.yaml create mode 100644 test/cubetiq_dart_shared_test.dart diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..65c34dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build outputs. +build/ + +# Omit committing pubspec.lock for library packages; see +# https://dart.dev/guides/libraries/private-files#pubspeclock. +pubspec.lock diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..effe43c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +- Initial version. diff --git a/README.md b/README.md new file mode 100644 index 0000000..04ba68d --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +A library for Dart developers. + +## Usage + +A simple usage example: + +```dart +import 'package:cubetiq_dart_shared/cubetiq_dart_shared.dart'; + +main() { + var awesome = new Awesome(); +} +``` + +## Features and bugs + +Please file feature requests and bugs at the [issue tracker][tracker]. + +[tracker]: http://example.com/issues/replaceme diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..18b40b8 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,16 @@ +# Defines a default set of lint rules enforced for projects at Google. For +# details and rationale, see +# https://github.com/dart-lang/pedantic#enabled-lints. + +include: package:pedantic/analysis_options.yaml + +# For lint rules and documentation, see http://dart-lang.github.io/linter/lints. + +# Uncomment to specify additional rules. +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** diff --git a/example/cubetiq_dart_shared_example.dart b/example/cubetiq_dart_shared_example.dart new file mode 100644 index 0000000..7de5ad4 --- /dev/null +++ b/example/cubetiq_dart_shared_example.dart @@ -0,0 +1,6 @@ +import 'package:cubetiq_dart_shared/cubetiq_dart_shared.dart'; + +void main() { + var awesome = Awesome(); + print('awesome: ${awesome.isAwesome}'); +} diff --git a/lib/cubetiq_dart_shared.dart b/lib/cubetiq_dart_shared.dart new file mode 100644 index 0000000..db364a8 --- /dev/null +++ b/lib/cubetiq_dart_shared.dart @@ -0,0 +1,8 @@ +/// Support for doing something awesome. +/// +/// More dartdocs go here. +library cubetiq_dart_shared; + +export 'src/cubetiq_dart_shared_base.dart'; + +// TODO: Export any libraries intended for clients of this package. diff --git a/lib/src/cubetiq_dart_shared_base.dart b/lib/src/cubetiq_dart_shared_base.dart new file mode 100644 index 0000000..e8a6f15 --- /dev/null +++ b/lib/src/cubetiq_dart_shared_base.dart @@ -0,0 +1,6 @@ +// TODO: Put public facing types in this file. + +/// Checks if you are awesome. Spoiler: you are. +class Awesome { + bool get isAwesome => true; +} diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..639d985 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,14 @@ +name: cubetiq_dart_shared +description: A starting point for Dart libraries or applications. +version: 1.0.0 +# homepage: https://www.example.com + +environment: + sdk: '>=2.12.0 <3.0.0' + +# dependencies: +# path: ^1.8.0 + +dev_dependencies: + pedantic: ^1.10.0 + test: ^1.16.0 diff --git a/test/cubetiq_dart_shared_test.dart b/test/cubetiq_dart_shared_test.dart new file mode 100644 index 0000000..e1dbbbe --- /dev/null +++ b/test/cubetiq_dart_shared_test.dart @@ -0,0 +1,16 @@ +import 'package:cubetiq_dart_shared/cubetiq_dart_shared.dart'; +import 'package:test/test.dart'; + +void main() { + group('A group of tests', () { + final awesome = Awesome(); + + setUp(() { + // Additional setup goes here. + }); + + test('First Test', () { + expect(awesome.isAwesome, isTrue); + }); + }); +}