diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..a0320c4 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1 @@ +Sergey Penkovsky \ No newline at end of file diff --git a/example/bin/main.dart b/example/bin/main.dart index f356716..2567621 100644 --- a/example/bin/main.dart +++ b/example/bin/main.dart @@ -1,7 +1,7 @@ import 'dart:async'; + +import 'package:cherrypick/cherrypick.dart'; import 'package:meta/meta.dart'; -import 'package:cherrypick/scope.dart'; -import 'package:cherrypick/module.dart'; class AppModule extends Module { @override diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 1f99490..665587a 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -1,6 +1,5 @@ name: example version: 1.0.0 -author: "Sergey Penkovsky " homepage: localhost publish_to: none diff --git a/lib/dart_di.dart b/lib/cherrypick.dart similarity index 76% rename from lib/dart_di.dart rename to lib/cherrypick.dart index a3268e4..053877e 100644 --- a/lib/dart_di.dart +++ b/lib/cherrypick.dart @@ -11,9 +11,9 @@ /// limitations under the License. /// -library dart_di; +library cherrypick; -export 'package:cherrypick/scope.dart'; -export 'package:cherrypick/module.dart'; -export 'package:cherrypick/binding.dart'; -export 'package:cherrypick/di.dart'; +export 'package:cherrypick/src/binding.dart'; +export 'package:cherrypick/src/helper.dart'; +export 'package:cherrypick/src/module.dart'; +export 'package:cherrypick/src/scope.dart'; diff --git a/lib/binding.dart b/lib/src/binding.dart similarity index 100% rename from lib/binding.dart rename to lib/src/binding.dart diff --git a/lib/factory.dart b/lib/src/factory.dart similarity index 94% rename from lib/factory.dart rename to lib/src/factory.dart index 5c093c4..f2bbb89 100644 --- a/lib/factory.dart +++ b/lib/src/factory.dart @@ -10,8 +10,7 @@ /// See the License for the specific language governing permissions and /// limitations under the License. /// - -import 'package:cherrypick/scope.dart'; +import 'package:cherrypick/src/scope.dart'; abstract class Factory { T createInstance(Scope scope); diff --git a/lib/di.dart b/lib/src/helper.dart similarity index 96% rename from lib/di.dart rename to lib/src/helper.dart index fd31fa1..cac39f7 100644 --- a/lib/di.dart +++ b/lib/src/helper.dart @@ -10,8 +10,7 @@ /// See the License for the specific language governing permissions and /// limitations under the License. /// - -import 'package:cherrypick/scope.dart'; +import 'package:cherrypick/src/scope.dart'; Scope? _rootScope; diff --git a/lib/module.dart b/lib/src/module.dart similarity index 95% rename from lib/module.dart rename to lib/src/module.dart index 8f44b73..32be9d9 100644 --- a/lib/module.dart +++ b/lib/src/module.dart @@ -10,11 +10,10 @@ /// See the License for the specific language governing permissions and /// limitations under the License. /// - import 'dart:collection'; -import 'package:cherrypick/binding.dart'; -import 'package:cherrypick/scope.dart'; +import 'package:cherrypick/src/binding.dart'; +import 'package:cherrypick/src/scope.dart'; /// RU: Класс Module является основой для пользовательских модулей. /// Этот класс нужен для инициализации [Scope]. diff --git a/lib/scope.dart b/lib/src/scope.dart similarity index 98% rename from lib/scope.dart rename to lib/src/scope.dart index 6179d4b..578b370 100644 --- a/lib/scope.dart +++ b/lib/src/scope.dart @@ -10,11 +10,10 @@ /// See the License for the specific language governing permissions and /// limitations under the License. /// - import 'dart:collection'; -import 'package:cherrypick/binding.dart'; -import 'package:cherrypick/module.dart'; +import 'package:cherrypick/src/binding.dart'; +import 'package:cherrypick/src/module.dart'; Scope openRootScope() => Scope(null); diff --git a/test/binding_test.dart b/test/src/binding_test.dart similarity index 99% rename from test/binding_test.dart rename to test/src/binding_test.dart index 9f18da5..b4127d3 100644 --- a/test/binding_test.dart +++ b/test/src/binding_test.dart @@ -1,4 +1,4 @@ -import 'package:cherrypick/binding.dart'; +import 'package:cherrypick/src/binding.dart'; import 'package:test/test.dart'; void main() { diff --git a/test/scope_test.dart b/test/src/scope_test.dart similarity index 96% rename from test/scope_test.dart rename to test/src/scope_test.dart index 51f1530..267cac8 100644 --- a/test/scope_test.dart +++ b/test/src/scope_test.dart @@ -1,5 +1,5 @@ -import 'package:cherrypick/module.dart'; -import 'package:cherrypick/scope.dart'; +import 'package:cherrypick/src/module.dart'; +import 'package:cherrypick/src/scope.dart'; import 'package:test/test.dart'; void main() {