Skip to content

Commit

Permalink
fix: Fixed a bug that files were not generated when information was e…
Browse files Browse the repository at this point in the history
…mpty.
  • Loading branch information
mathrunet committed Dec 7, 2022
1 parent c5c62b2 commit 356600f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 31 deletions.
18 changes: 9 additions & 9 deletions packages/katana_theme/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,11 @@ packages:
source: hosted
version: "4.7.0"
katana:
dependency: transitive
dependency: "direct overridden"
description:
name: katana
url: "https://pub.dartlang.org"
source: hosted
path: "../../katana"
relative: true
source: path
version: "0.15.10"
katana_theme:
dependency: "direct main"
Expand All @@ -299,11 +299,11 @@ packages:
source: path
version: "1.2.4"
katana_theme_annotation:
dependency: transitive
dependency: "direct overridden"
description:
name: katana_theme_annotation
url: "https://pub.dartlang.org"
source: hosted
path: "../../katana_theme_annotation"
relative: true
source: path
version: "1.2.2"
katana_theme_builder:
dependency: "direct dev"
Expand Down Expand Up @@ -353,7 +353,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.3"
package_config:
dependency: transitive
description:
Expand Down
12 changes: 6 additions & 6 deletions packages/katana_theme/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,16 @@ packages:
katana:
dependency: "direct main"
description:
name: katana
url: "https://pub.dartlang.org"
source: hosted
path: "../katana"
relative: true
source: path
version: "0.15.10"
katana_theme_annotation:
dependency: "direct main"
description:
name: katana_theme_annotation
url: "https://pub.dartlang.org"
source: hosted
path: "../katana_theme_annotation"
relative: true
source: path
version: "1.2.2"
matcher:
dependency: transitive
Expand Down
12 changes: 6 additions & 6 deletions packages/katana_theme_annotation/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ packages:
name: coverage
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.1"
version: "1.6.0"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -151,9 +151,9 @@ packages:
katana:
dependency: "direct main"
description:
name: katana
url: "https://pub.dartlang.org"
source: hosted
path: "../katana"
relative: true
source: path
version: "0.15.10"
logging:
dependency: transitive
Expand Down Expand Up @@ -182,7 +182,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.3"
node_preamble:
dependency: transitive
description:
Expand All @@ -203,7 +203,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.8.3"
pointycastle:
dependency: transitive
description:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ class ThemeGenerator extends GeneratorForAnnotation<AppTheme> {
),
);
final emitter = DartEmitter();
final code = generated.accept(emitter).toString();
return DartFormatter().format(
"${generated.accept(emitter)}",
code.isEmpty ? "// no code." : code,
);
}
}
18 changes: 9 additions & 9 deletions packages/katana_theme_builder/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ packages:
name: coverage
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.1"
version: "1.6.0"
crypto:
dependency: transitive
description:
Expand Down Expand Up @@ -193,16 +193,16 @@ packages:
katana:
dependency: "direct main"
description:
name: katana
url: "https://pub.dartlang.org"
source: hosted
path: "../katana"
relative: true
source: path
version: "0.15.10"
katana_theme_annotation:
dependency: "direct main"
description:
name: katana_theme_annotation
url: "https://pub.dartlang.org"
source: hosted
path: "../katana_theme_annotation"
relative: true
source: path
version: "1.2.2"
logging:
dependency: transitive
Expand Down Expand Up @@ -231,7 +231,7 @@ packages:
name: mime
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
version: "1.0.3"
node_preamble:
dependency: transitive
description:
Expand All @@ -252,7 +252,7 @@ packages:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.2"
version: "1.8.3"
pointycastle:
dependency: transitive
description:
Expand Down

0 comments on commit 356600f

Please sign in to comment.