Skip to content

Commit

Permalink
Move extra pub in main pub
Browse files Browse the repository at this point in the history
  • Loading branch information
maxammann committed Sep 14, 2022
1 parent 1ba6d6d commit 254d0e5
Show file tree
Hide file tree
Showing 12 changed files with 674 additions and 1,274 deletions.
2 changes: 1 addition & 1 deletion frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ vendor/
.fvm/flutter_sdk
runConfigurations.xml

lib/build_config.dart
lib/build_config/build_config.dart
19 changes: 17 additions & 2 deletions frontend/build.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Read about `build.yaml` at https://pub.dev/packages/build_config

builders:
# name of the builder
df_build_config:
# library URI containing the builder
import: "package:ehrenamtskarte/build_config/builder.dart"
# Name of the function in the above library to call.
builder_factories: ["configBuilder"]
# The mapping from the source extension to the generated file extension
build_extensions: {".yaml": [".dart"]}
# Will automatically run on any package that depends on it
auto_apply: root_package
# Generate the output to a hidden cache dir
build_to: source
applies_builders: []


targets:
$default:
Expand All @@ -8,9 +23,9 @@ targets:
- lib/$lib$
- graphql_queries/**
- schema.graphql
- lib/build_config.yaml
- lib/build_config/build_config.yaml
builders:
df_build_config:
ehrenamtskarte|df_build_config:
generate_for:
include:
- "**/*.yaml"
Expand Down
2 changes: 1 addition & 1 deletion frontend/lib/app.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:ehrenamtskarte/build_config.dart';
import 'package:ehrenamtskarte/build_config/build_config.dart';
import 'package:ehrenamtskarte/configuration/settings_model.dart';
import 'package:ehrenamtskarte/entry_widget.dart';
import 'package:ehrenamtskarte/graphql/configured_graphql_provider.dart';
Expand Down
File renamed without changes.
17 changes: 17 additions & 0 deletions frontend/lib/build_config/builder.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import 'dart:async';

import 'package:build/build.dart';

class MyBuilder extends Builder {
@override
FutureOr<void> build(BuildStep buildStep) {
buildStep.writeAsString(buildStep.allowedOutputs.first, "class Test {}\n");
}

@override
Map<String, List<String>> get buildExtensions => {".yaml": [".dart"]};
}

Builder configBuilder(BuilderOptions options) {
return MyBuilder();
}
Loading

0 comments on commit 254d0e5

Please sign in to comment.