Skip to content

Commit 744ed07

Browse files
committed
+chore: Update dependencies
1 parent 3a2d0ad commit 744ed07

File tree

3 files changed

+32
-30
lines changed

3 files changed

+32
-30
lines changed

lib/src/gen_indexes.dart

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
//.title~
1212

1313
import 'package:df_gen_core/df_gen_core.dart';
14+
// ignore: implementation_imports
15+
import 'package:df_config/src/_etc/replace_data.dart';
1416

1517
import 'package:path/path.dart' as p;
1618

@@ -44,7 +46,7 @@ Future<void> genIndexes(
4446

4547
final help = argResults.flag(DefaultFlags.HELP.name);
4648
if (help) {
47-
_print(printCyan, parser.getInfo(argParser));
49+
_print(Glog.printCyan, parser.getInfo(argParser));
4850
exit(ExitCodes.SUCCESS.code);
4951
}
5052

@@ -57,7 +59,7 @@ Future<void> genIndexes(
5759
templates = argResults.multiOption(DefaultMultiOptions.TEMPLATES.name);
5860
} catch (_) {
5961
_print(
60-
printRed,
62+
Glog.printRed,
6163
'Missing required args! Use --help flag for more information.',
6264
);
6365
exit(ExitCodes.FAILURE.code);
@@ -70,7 +72,7 @@ Future<void> genIndexes(
7072

7173
// ---------------------------------------------------------------------------
7274

73-
_print(printWhite, 'Looking for files..');
75+
_print(Glog.printWhite, 'Looking for files..');
7476
final filePathStream0 = PathExplorer(inputPath).exploreFiles();
7577
final filePathStream1 = filePathStream0.where((e) {
7678
final path = p.relative(e.path, from: inputPath);
@@ -80,34 +82,33 @@ Future<void> genIndexes(
8082
try {
8183
findings = await filePathStream1.toList();
8284
} catch (e) {
83-
_print(printRed, 'Failed to read file tree!', spinner);
85+
_print(Glog.printRed, 'Failed to read file tree!', spinner);
8486
exit(ExitCodes.FAILURE.code);
8587
}
8688
if (findings.isEmpty) {
8789
spinner.stop();
88-
_print(printYellow, 'No files found in $inputPath!');
90+
_print(Glog.printYellow, 'No files found in $inputPath!');
8991
exit(ExitCodes.SUCCESS.code);
9092
}
9193

9294
// ---------------------------------------------------------------------------
9395

9496
final templateData = <String, String>{};
9597
for (final template in templates) {
96-
_print(printWhite, 'Reading template at: $template...');
97-
final result =
98-
await MdTemplateUtility.i.readTemplateFromPathOrUrl(template).value;
98+
_print(Glog.printWhite, 'Reading template at: $template...');
99+
final result = await MdTemplateUtility.i.readTemplateFromPathOrUrl(template).value;
99100

100101
if (result.isErr()) {
101102
spinner.stop();
102-
_print(printRed, ' Failed to read template!');
103+
_print(Glog.printRed, ' Failed to read template!');
103104
exit(ExitCodes.FAILURE.code);
104105
}
105106
templateData[template] = result.unwrap();
106107
}
107108

108109
// ---------------------------------------------------------------------------
109110

110-
_print(printWhite, 'Generating...', spinner);
111+
_print(Glog.printWhite, 'Generating...', spinner);
111112
final inputBasename = p.basename(inputPath);
112113
for (final entry in templateData.entries) {
113114
final fileName = p
@@ -129,19 +130,19 @@ Future<void> genIndexes(
129130
),
130131
});
131132

132-
_print(printWhite, 'Writing output to $fileName...', spinner);
133+
_print(Glog.printWhite, 'Writing output to $fileName...', spinner);
133134
try {
134135
await FileSystemUtility.i.writeLocalFile(fileName, data);
135136
} catch (e) {
136-
_print(printRed, 'Failed to write at: $fileName', spinner);
137+
_print(Glog.printRed, 'Failed to write at: $fileName', spinner);
137138
exit(ExitCodes.FAILURE.code);
138139
}
139140
}
140141

141142
// ---------------------------------------------------------------------------
142143

143144
spinner.stop();
144-
_print(printGreen, 'Done!');
145+
_print(Glog.printGreen, 'Done!');
145146
}
146147

147148
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

lib/src/gen_indexes_ts.dart

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
//.title~
1212

1313
import 'package:df_gen_core/df_gen_core.dart';
14+
// ignore: implementation_imports
15+
import 'package:df_config/src/_etc/replace_data.dart';
1416

1517
import 'package:path/path.dart' as p;
1618

@@ -44,7 +46,7 @@ Future<void> genIndexesTs(
4446

4547
final help = argResults.flag(DefaultFlags.HELP.name);
4648
if (help) {
47-
_print(printCyan, parser.getInfo(argParser));
49+
_print(Glog.printCyan, parser.getInfo(argParser));
4850
exit(ExitCodes.SUCCESS.code);
4951
}
5052

@@ -57,7 +59,7 @@ Future<void> genIndexesTs(
5759
templates = argResults.multiOption(DefaultMultiOptions.TEMPLATES.name);
5860
} catch (_) {
5961
_print(
60-
printRed,
62+
Glog.printRed,
6163
'Missing required args! Use --help flag for more information.',
6264
);
6365
exit(ExitCodes.FAILURE.code);
@@ -70,7 +72,7 @@ Future<void> genIndexesTs(
7072

7173
// ---------------------------------------------------------------------------
7274

73-
_print(printWhite, 'Looking for files..');
75+
_print(Glog.printWhite, 'Looking for files..');
7476
final filePathStream0 = PathExplorer(inputPath).exploreFiles();
7577
final filePathStream1 = filePathStream0.where((e) {
7678
print(e);
@@ -82,34 +84,33 @@ Future<void> genIndexesTs(
8284
try {
8385
findings = await filePathStream1.toList();
8486
} catch (e) {
85-
_print(printRed, 'Failed to read file tree!', spinner);
87+
_print(Glog.printRed, 'Failed to read file tree!', spinner);
8688
exit(ExitCodes.FAILURE.code);
8789
}
8890
if (findings.isEmpty) {
8991
spinner.stop();
90-
_print(printYellow, 'No files found in $inputPath!');
92+
_print(Glog.printYellow, 'No files found in $inputPath!');
9193
exit(ExitCodes.SUCCESS.code);
9294
}
9395

9496
// ---------------------------------------------------------------------------
9597

9698
final templateData = <String, String>{};
9799
for (final template in templates) {
98-
_print(printWhite, 'Reading template at: $template...');
99-
final result =
100-
await MdTemplateUtility.i.readTemplateFromPathOrUrl(template).value;
100+
_print(Glog.printWhite, 'Reading template at: $template...');
101+
final result = await MdTemplateUtility.i.readTemplateFromPathOrUrl(template).value;
101102

102103
if (result.isErr()) {
103104
spinner.stop();
104-
_print(printRed, ' Failed to read template!');
105+
_print(Glog.printRed, ' Failed to read template!');
105106
exit(ExitCodes.FAILURE.code);
106107
}
107108
templateData[template] = result.unwrap();
108109
}
109110

110111
// ---------------------------------------------------------------------------
111112

112-
_print(printWhite, 'Generating...', spinner);
113+
_print(Glog.printWhite, 'Generating...', spinner);
113114

114115
for (final entry in templateData.entries) {
115116
final fileName = p.basename(entry.key).replaceAll('.md', '');
@@ -124,11 +125,11 @@ Future<void> genIndexesTs(
124125
(e) => 'export * from \'./$e\';',
125126
),
126127
});
127-
_print(printWhite, 'Writing output to $fileName...', spinner);
128+
_print(Glog.printWhite, 'Writing output to $fileName...', spinner);
128129
try {
129130
await FileSystemUtility.i.writeLocalFile(fileName, data);
130131
} catch (e) {
131-
_print(printRed, 'Failed to write at: $fileName', spinner);
132+
_print(Glog.printRed, 'Failed to write at: $fileName', spinner);
132133
exit(ExitCodes.FAILURE.code);
133134
}
134135
}
@@ -137,7 +138,7 @@ Future<void> genIndexesTs(
137138

138139
// [STEP 11] Print success!
139140
spinner.stop();
140-
_print(printGreen, 'Done!');
141+
_print(Glog.printGreen, 'Done!');
141142
}
142143

143144
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
name: df_generate_dart_indexes
1414
description: A tool to generate index/exports files also known as barrel files for all Dart files in a directory.
15-
version: 0.5.13
15+
version: 0.5.14
1616
homepage: https://dev-cetera.com
1717
repository: https://github.com/dev-cetera/df_generate_dart_indexes
1818
funding:
@@ -32,9 +32,9 @@ environment:
3232
## -----------------------------------------------------------------------------
3333

3434
dependencies:
35-
df_config: ^0.6.2
36-
df_gen_core: ^0.6.5
37-
df_log: ^0.2.4
35+
df_config: ^0.7.1
36+
df_gen_core: ^0.6.8
37+
df_log: ^0.3.4
3838
args: ^2.6.0
3939
path: ^1.9.1
4040

0 commit comments

Comments
 (0)