Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function findTailwindConfigurationFile(
);

// A configuration file can exist in the project or workspace root
for await (const { root, files } of dirEntries) {
for (const { root, files } of await Promise.all(dirEntries)) {
for (const potentialConfig of tailwindConfigFiles) {
if (files.has(potentialConfig)) {
return join(root, potentialConfig);
Expand Down
10 changes: 8 additions & 2 deletions packages/angular_devkit/schematics/src/rules/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ export function empty(): Source {
export function chain(rules: Iterable<Rule> | AsyncIterable<Rule>): Rule {
return async (initialTree, context) => {
let intermediateTree: Observable<Tree> | undefined;
for await (const rule of rules) {
intermediateTree = callRule(rule, intermediateTree ?? initialTree, context);
if (Symbol.asyncIterator in rules) {
for await (const rule of rules) {
intermediateTree = callRule(rule, intermediateTree ?? initialTree, context);
}
} else {
for (const rule of rules) {
intermediateTree = callRule(rule, intermediateTree ?? initialTree, context);
}
}

return () => intermediateTree;
Expand Down