platform/tool/phases.dart

17 lines
671 B
Dart
Raw Normal View History

2017-06-17 16:45:31 +00:00
import 'package:build_runner/build_runner.dart';
import 'package:source_gen/source_gen.dart';
import 'package:angel_orm/builder.dart';
import 'package:angel_serialize/builder.dart';
2017-06-24 21:21:32 +00:00
final InputSet MODELS = new InputSet('angel_orm', const ['test/models/*.dart']);
2017-06-17 16:45:31 +00:00
final PhaseGroup PHASES = new PhaseGroup()
..addPhase(new Phase()
2017-06-24 21:21:32 +00:00
..addAction(new GeneratorBuilder([const JsonModelGenerator()]), MODELS))
2017-06-17 16:45:31 +00:00
..addPhase(new Phase()
..addAction(
2017-06-18 04:19:05 +00:00
new GeneratorBuilder([new PostgresORMGenerator()],
2017-06-17 16:45:31 +00:00
isStandalone: true, generatedExtension: '.orm.g.dart'),
2017-06-24 21:21:32 +00:00
MODELS))
..addPhase(new Phase()..addAction(new SQLMigrationGenerator(), MODELS));