Skip to content

Commit f012f91

Browse files
Dillon Nysragingsquirrel3
authored andcommitted
chore(aft): Bootstrap docs package
1 parent b2d1055 commit f012f91

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

packages/aft/lib/src/commands/bootstrap_command.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ const amplifyEnvironments = <String, String>{};
7979
// command is significantly newer/older than the embedded one.
8080
(pkg) => pkg.name != 'aft',
8181
)
82-
.expand((pkg) => [pkg, pkg.example])
82+
.expand((pkg) => [pkg, pkg.example, pkg.docs])
8383
.nonNulls;
8484
for (final package in bootstrapPackages) {
8585
await pubAction(

packages/aft/lib/src/models/config.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class PackageInfo
128128
required this.pubspecInfo,
129129
required this.flavor,
130130
this.example,
131+
this.docs,
131132
});
132133

133134
factory PackageInfo.fromJson(Map<String, Object?> json) =>
@@ -158,12 +159,17 @@ class PackageInfo
158159
example ??= PackageInfo.fromDirectory(categoryExampleDir);
159160
}
160161

162+
// Look for docs package
163+
final docsDir = Directory.fromUri(dir.uri.resolve('doc/'));
164+
final docs = PackageInfo.fromDirectory(docsDir);
165+
161166
return PackageInfo(
162167
name: pubspec.name,
163168
path: dir.path,
164169
pubspecInfo: pubspecInfo,
165170
flavor: pubspec.flavor,
166171
example: example,
172+
docs: docs,
167173
);
168174
}
169175

@@ -182,6 +188,9 @@ class PackageInfo
182188
/// The example for this package, if any.
183189
final PackageInfo? example;
184190

191+
/// The docs package, if any.
192+
final PackageInfo? docs;
193+
185194
/// The unit test directory within the enclosing directory, if any
186195
Directory? get unitTestDirectory {
187196
final expectedPath = p.join(path, 'test');

0 commit comments

Comments
 (0)