Skip to content

Commit 61f499b

Browse files
authored
Switch from part structure to export layout (#169)
1 parent 34cfa79 commit 61f499b

19 files changed

+58
-63
lines changed

lib/dartx.dart

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
11
/// Superpowers for Dart. Collection of useful static extension methods.
22
library dartx;
33

4-
import 'dart:collection';
5-
import 'dart:convert';
6-
import 'dart:math';
7-
import 'dart:typed_data';
8-
9-
import 'package:characters/characters.dart' as characters;
10-
import 'package:collection/collection.dart' as collection;
11-
import 'package:crypto/crypto.dart' as crypto;
12-
134
export 'package:characters/characters.dart';
145
export 'package:time/time.dart';
156

16-
part 'src/arithmetic.dart';
17-
part 'src/comparable.dart';
18-
part 'src/comparator.dart';
19-
part 'src/function.dart';
20-
part 'src/int.dart';
21-
part 'src/iterable.dart';
22-
part 'src/iterable_num.dart';
23-
part 'src/list.dart';
24-
part 'src/map.dart';
25-
part 'src/num.dart';
26-
part 'src/range.dart';
27-
part 'src/sorted_list.dart';
28-
part 'src/string.dart';
7+
export 'src/arithmetic.dart';
8+
export 'src/comparable.dart';
9+
export 'src/comparator.dart';
10+
export 'src/function.dart';
11+
export 'src/int.dart';
12+
export 'src/iterable.dart';
13+
export 'src/iterable_num.dart';
14+
export 'src/list.dart';
15+
export 'src/map.dart';
16+
export 'src/num.dart';
17+
export 'src/range.dart';
18+
export 'src/sorted_list.dart';
19+
export 'src/string.dart';

lib/dartx_io.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
/// Superpowers for Dart IO. Collection of useful static extension methods.
22
library dartx_io;
33

4-
import 'dart:convert';
5-
import 'dart:io';
6-
import 'dart:typed_data';
7-
8-
import 'package:path/path.dart' as path_helper;
9-
104
export 'dartx.dart';
115

12-
part 'src/io/directory.dart';
13-
part 'src/io/file_system_entity.dart';
14-
part 'src/io/file.dart';
6+
export 'src/io/directory.dart';
7+
export 'src/io/file.dart';
8+
export 'src/io/file_system_entity.dart';

lib/src/arithmetic.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
part of dartx;
2-
31
extension NumArithmeticX<T extends num> on T {
42
/// Minus val if if it not null else returns `this`
53
T? minus(T? val) => val == null ? this : this - val as T?;

lib/src/comparable.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
part of dartx;
1+
import 'package:dartx/dartx.dart';
22

33
/// Provides comparison operators for [Comparable] types.
44
extension ComparableSmallerExtension<T extends Comparable<T>> on T {

lib/src/comparator.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
part of dartx;
2-
31
extension CompararatorComposeExtensions<T> on Comparator<T> {
42
/// return a new comparator,
53
/// that sorts the items first by the criteria of this comparator,

lib/src/function.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
part of dartx;
2-
31
typedef Function0<R> = R Function();
42
typedef Function1<A, R> = R Function(A a);
53
typedef Function2<A, B, R> = R Function(A a, B b);

lib/src/int.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
part of dartx;
2-
31
extension Ordinals<T extends int> on T {
42
/// Returns an ordinal number of `String` type for any integer
53
///

lib/src/io/directory.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
part of dartx_io;
1+
import 'dart:io';
2+
3+
import 'package:path/path.dart' as path_helper;
24

35
extension DirectorySubDirExtension on Directory {
46
Directory subdir(

lib/src/io/file.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
part of dartx_io;
1+
import 'dart:convert';
2+
import 'dart:io';
3+
import 'dart:typed_data';
24

35
extension FileAppendBytesExtension on File {
46
/// Appends an array of [bytes] to the content of this file.

lib/src/io/file_system_entity.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
part of dartx_io;
1+
import 'dart:io';
2+
3+
import 'package:path/path.dart' as path_helper;
24

35
extension FileSystemEntityNameExtension on FileSystemEntity {
46
/// Gets the part of [path] after the last separator.

0 commit comments

Comments
 (0)