Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary optimisation for build_runner builder #171

Closed
Closed
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
6 changes: 0 additions & 6 deletions slang_build_runner/lib/slang_build_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,12 @@ Builder i18nBuilder(BuilderOptions options) {
class I18nBuilder implements Builder {
final RawConfig config;
final String outputFilePattern;
bool _generated = false;

I18nBuilder({required this.config})
: this.outputFilePattern = config.outputFileName.getFileExtension();

@override
FutureOr<void> build(BuildStep buildStep) async {
// only generate once
if (_generated) return;

_generated = true;

final Glob findAssetsPattern = config.inputDirectory != null
? Glob('**${config.inputDirectory}/**${config.inputFilePattern}')
: Glob('**${config.inputFilePattern}');
Expand Down