Part directive
This commit is contained in:
parent
4bf3308beb
commit
63df555639
3 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,6 @@
|
|||
# 1.3.2
|
||||
* Restore `part` directives in generated models.
|
||||
|
||||
# 1.3.1
|
||||
* Add `deploy nginx` and `deploy systemd`.
|
||||
|
||||
|
|
|
@ -72,6 +72,11 @@ class ModelCommand extends Command {
|
|||
deps.add(const MakerDependency('angel_orm', '^1.0.0-alpha'));
|
||||
}
|
||||
|
||||
modelLib.body.addAll([
|
||||
new Code('part ${rc.snakeCase}.g.dart'),
|
||||
new Code('part ${rc.snakeCase}.serializer.g.dart'),
|
||||
]);
|
||||
|
||||
modelLib.body.add(new Class((modelClazz) {
|
||||
modelClazz
|
||||
..abstract = true
|
||||
|
@ -79,7 +84,6 @@ class ModelCommand extends Command {
|
|||
..extend = refer('Model');
|
||||
|
||||
if (needsSerialize) {
|
||||
// TODO: Add parts
|
||||
// modelLib.addDirective(new PartBuilder('${rc.snakeCase}.g.dart'));
|
||||
modelClazz.annotations.add(refer('serializable'));
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ author: Tobe O <thosakwe@gmail.com>
|
|||
description: Command-line tools for the Angel framework.
|
||||
homepage: https://github.com/angel-dart/angel_cli
|
||||
name: angel_cli
|
||||
version: 1.3.1
|
||||
version: 1.3.2
|
||||
dependencies:
|
||||
analyzer: ">=0.32.0"
|
||||
args: ^1.0.0
|
||||
|
|
Loading…
Reference in a new issue