diff --git a/.idea/runConfigurations/build_dart.xml b/.idea/runConfigurations/build_dart.xml deleted file mode 100644 index c2cc1300..00000000 --- a/.idea/runConfigurations/build_dart.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/runConfigurations/watch_dart.xml b/.idea/runConfigurations/watch_dart.xml deleted file mode 100644 index 03d1b631..00000000 --- a/.idea/runConfigurations/watch_dart.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/angel_serialize_generator/lib/angel_serialize_generator.dart b/angel_serialize_generator/lib/angel_serialize_generator.dart index dff6d31b..076f46ce 100644 --- a/angel_serialize_generator/lib/angel_serialize_generator.dart +++ b/angel_serialize_generator/lib/angel_serialize_generator.dart @@ -1,6 +1,7 @@ library angel_serialize_generator; import 'dart:async'; + import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/dart/element/type.dart'; import 'package:angel_model/angel_model.dart'; @@ -11,6 +12,7 @@ import 'package:code_builder/code_builder.dart'; import 'package:path/path.dart' as p; import 'package:recase/recase.dart'; import 'package:source_gen/source_gen.dart' hide LibraryBuilder; + import 'build_context.dart'; import 'context.dart'; @@ -23,14 +25,14 @@ part 'typescript.dart'; Builder jsonModelBuilder(_) { return new PartBuilder( const [const JsonModelGenerator()], - generatedExtension: '.g.dart', + '.g.dart', ); } Builder serializerBuilder(_) { return new PartBuilder( const [const SerializerGenerator()], - generatedExtension: '.serializer.g.dart', + '.serializer.g.dart', ); } diff --git a/angel_serialize_generator/tool/applications.dart b/angel_serialize_generator/tool/applications.dart deleted file mode 100644 index 561f3da0..00000000 --- a/angel_serialize_generator/tool/applications.dart +++ /dev/null @@ -1,69 +0,0 @@ -import 'package:angel_serialize_generator/angel_serialize_generator.dart'; -import 'package:build_config/build_config.dart'; -import 'package:build_runner/build_runner.dart'; -import 'package:source_gen/source_gen.dart'; - -const InputSet standalone = - const InputSet(include: const ['test/models/book.dart']); -const InputSet dependent = - const InputSet(include: const ['test/models/author.dart']); -const InputSet all = const InputSet(include: const ['test/models/*.dart']); - -final List applications = [ - applyToRoot( - new PartBuilder([ - const JsonModelGenerator(), - ]), - generateFor: standalone, - ), - applyToRoot( - new PartBuilder([ - const JsonModelGenerator(), - ]), - generateFor: dependent, - ), - applyToRoot( - new PartBuilder( - [const SerializerGenerator()], - generatedExtension: '.serializer.g.dart', - ), - generateFor: all, - ), - applyToRoot( - const TypeScriptDefinitionBuilder(), - generateFor: all, - ), -]; - -/* -import 'package:build_runner/build_runner.dart'; -import 'package:source_gen/source_gen.dart'; -import 'package:angel_serialize_generator/angel_serialize_generator.dart'; - -final List actions = [ - jsonModel(const ['test/models/book.dart']), - jsonModel(const ['test/models/author.dart']), - angelSerialize(const ['test/models/book.dart']), - angelSerialize(const ['test/models/author.dart']), -]; - -BuildAction jsonModel(List inputs) { - return new BuildAction( - new PartBuilder([const JsonModelGenerator()]), - 'angel_serialize_generator', - inputs: inputs, - ); -} - -BuildAction angelSerialize(List inputs) { - return new BuildAction( - new PartBuilder( - [const SerializerGenerator()], - generatedExtension: '.serializer.g.dart', - ), - 'angel_serialize_generator', - inputs: inputs, - ); -} - -*/ diff --git a/angel_serialize_generator/tool/build.dart b/angel_serialize_generator/tool/build.dart deleted file mode 100644 index 6bb6d535..00000000 --- a/angel_serialize_generator/tool/build.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:build_runner/build_runner.dart'; -import 'applications.dart'; - -main() => build(applications, deleteFilesByDefault: true, verbose: false); diff --git a/angel_serialize_generator/tool/watch.dart b/angel_serialize_generator/tool/watch.dart deleted file mode 100644 index 0e7b2b2f..00000000 --- a/angel_serialize_generator/tool/watch.dart +++ /dev/null @@ -1,4 +0,0 @@ -import 'package:build_runner/build_runner.dart'; -import 'applications.dart'; - -main() => watch(applications, deleteFilesByDefault: true, verbose: false);