Remove old build scripts

This commit is contained in:
Tobe O 2018-08-21 17:17:53 -04:00
parent d4fbdcb220
commit 80f6f08a63
6 changed files with 4 additions and 93 deletions

View file

@ -1,7 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="build.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/angel_serialize_generator/tool/build.dart" />
<option name="workingDirectory" value="$PROJECT_DIR$/angel_serialize_generator" />
<method />
</configuration>
</component>

View file

@ -1,7 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="watch.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
<option name="filePath" value="$PROJECT_DIR$/angel_serialize_generator/tool/watch.dart" />
<option name="workingDirectory" value="$PROJECT_DIR$/angel_serialize_generator" />
<method />
</configuration>
</component>

View file

@ -1,6 +1,7 @@
library angel_serialize_generator; library angel_serialize_generator;
import 'dart:async'; import 'dart:async';
import 'package:analyzer/dart/element/element.dart'; import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/type.dart'; import 'package:analyzer/dart/element/type.dart';
import 'package:angel_model/angel_model.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:path/path.dart' as p;
import 'package:recase/recase.dart'; import 'package:recase/recase.dart';
import 'package:source_gen/source_gen.dart' hide LibraryBuilder; import 'package:source_gen/source_gen.dart' hide LibraryBuilder;
import 'build_context.dart'; import 'build_context.dart';
import 'context.dart'; import 'context.dart';
@ -23,14 +25,14 @@ part 'typescript.dart';
Builder jsonModelBuilder(_) { Builder jsonModelBuilder(_) {
return new PartBuilder( return new PartBuilder(
const [const JsonModelGenerator()], const [const JsonModelGenerator()],
generatedExtension: '.g.dart', '.g.dart',
); );
} }
Builder serializerBuilder(_) { Builder serializerBuilder(_) {
return new PartBuilder( return new PartBuilder(
const [const SerializerGenerator()], const [const SerializerGenerator()],
generatedExtension: '.serializer.g.dart', '.serializer.g.dart',
); );
} }

View file

@ -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<BuilderApplication> 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<BuildAction> 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<String> inputs) {
return new BuildAction(
new PartBuilder([const JsonModelGenerator()]),
'angel_serialize_generator',
inputs: inputs,
);
}
BuildAction angelSerialize(List<String> inputs) {
return new BuildAction(
new PartBuilder(
[const SerializerGenerator()],
generatedExtension: '.serializer.g.dart',
),
'angel_serialize_generator',
inputs: inputs,
);
}
*/

View file

@ -1,4 +0,0 @@
import 'package:build_runner/build_runner.dart';
import 'applications.dart';
main() => build(applications, deleteFilesByDefault: true, verbose: false);

View file

@ -1,4 +0,0 @@
import 'package:build_runner/build_runner.dart';
import 'applications.dart';
main() => watch(applications, deleteFilesByDefault: true, verbose: false);