2.1.5
This commit is contained in:
parent
449a71100e
commit
589c40415c
5 changed files with 35 additions and 12 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
# 2.1.5
|
||||||
|
* Add `shared` boilerplates.
|
||||||
|
* Remove uncecessary `angel_model` imports.
|
||||||
|
|
||||||
# 2.1.4+1
|
# 2.1.4+1
|
||||||
* Patch `part of 'path'` renames.
|
* Patch `part of 'path'` renames.
|
||||||
|
|
||||||
|
|
|
@ -240,10 +240,24 @@ const BoilerplateInfo legacyBoilerplate = const BoilerplateInfo(
|
||||||
ref: '1.1.x',
|
ref: '1.1.x',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const BoilerplateInfo sharedBoilerplate = const BoilerplateInfo(
|
||||||
|
'Shared',
|
||||||
|
'Holds common models and files shared across multiple Dart projects.',
|
||||||
|
'https://github.com/angel-dart/boilerplate_shared.git');
|
||||||
|
|
||||||
|
const BoilerplateInfo sharedOrmBoilerplate = const BoilerplateInfo(
|
||||||
|
'Shared (ORM)',
|
||||||
|
'Holds common models and files shared across multiple Dart projects.',
|
||||||
|
'https://github.com/angel-dart/boilerplate_shared.git',
|
||||||
|
ref: 'orm',
|
||||||
|
);
|
||||||
|
|
||||||
const List<BoilerplateInfo> boilerplates = const [
|
const List<BoilerplateInfo> boilerplates = const [
|
||||||
basicBoilerplate,
|
basicBoilerplate,
|
||||||
//legacyBoilerplate,
|
//legacyBoilerplate,
|
||||||
ormBoilerplate,
|
ormBoilerplate,
|
||||||
|
sharedBoilerplate,
|
||||||
|
sharedOrmBoilerplate,
|
||||||
];
|
];
|
||||||
|
|
||||||
class BoilerplateInfo {
|
class BoilerplateInfo {
|
||||||
|
|
|
@ -54,9 +54,6 @@ class ModelCommand extends Command {
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
modelLib.directives
|
|
||||||
.add(new Directive.import('package:angel_model/angel_model.dart'));
|
|
||||||
|
|
||||||
var needsSerialize = argResults['serializable'] as bool ||
|
var needsSerialize = argResults['serializable'] as bool ||
|
||||||
argResults['orm'] as bool ||
|
argResults['orm'] as bool ||
|
||||||
argResults['migration'] as bool;
|
argResults['migration'] as bool;
|
||||||
|
@ -67,6 +64,10 @@ class ModelCommand extends Command {
|
||||||
deps.add(const MakerDependency('angel_serialize', '^2.0.0'));
|
deps.add(const MakerDependency('angel_serialize', '^2.0.0'));
|
||||||
deps.add(const MakerDependency('angel_serialize_generator', '^2.0.0'));
|
deps.add(const MakerDependency('angel_serialize_generator', '^2.0.0'));
|
||||||
deps.add(const MakerDependency('build_runner', '">=0.7.0 <0.10.0"'));
|
deps.add(const MakerDependency('build_runner', '">=0.7.0 <0.10.0"'));
|
||||||
|
} else {
|
||||||
|
modelLib.directives
|
||||||
|
.add(new Directive.import('package:angel_model/angel_model.dart'));
|
||||||
|
deps.add(const MakerDependency('angel_model', '^1.0.0'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argResults['orm'] as bool || argResults['migration'] as bool) {
|
if (argResults['orm'] as bool || argResults['migration'] as bool) {
|
||||||
|
|
|
@ -81,9 +81,12 @@ renamePubspec(Directory dir, String oldName, String newName) async {
|
||||||
}
|
}
|
||||||
|
|
||||||
renameDartFiles(Directory dir, String oldName, String newName) async {
|
renameDartFiles(Directory dir, String oldName, String newName) async {
|
||||||
|
if (!await dir.exists()) return;
|
||||||
|
|
||||||
// Try to replace MongoDB URL
|
// Try to replace MongoDB URL
|
||||||
var configGlob = new Glob('config/**/*.yaml');
|
var configGlob = new Glob('config/**/*.yaml');
|
||||||
|
|
||||||
|
try {
|
||||||
await for (var yamlFile in configGlob.list(root: dir.absolute.path)) {
|
await for (var yamlFile in configGlob.list(root: dir.absolute.path)) {
|
||||||
if (yamlFile is File) {
|
if (yamlFile is File) {
|
||||||
print(
|
print(
|
||||||
|
@ -93,6 +96,7 @@ renameDartFiles(Directory dir, String oldName, String newName) async {
|
||||||
await yamlFile.writeAsString(contents);
|
await yamlFile.writeAsString(contents);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (_) {}
|
||||||
|
|
||||||
var entry = new File.fromUri(dir.uri.resolve('lib/$oldName.dart'));
|
var entry = new File.fromUri(dir.uri.resolve('lib/$oldName.dart'));
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@ author: Tobe O <thosakwe@gmail.com>
|
||||||
description: Command-line tools for the Angel framework.
|
description: Command-line tools for the Angel framework.
|
||||||
homepage: https://github.com/angel-dart/angel_cli
|
homepage: https://github.com/angel-dart/angel_cli
|
||||||
name: angel_cli
|
name: angel_cli
|
||||||
version: 2.1.4+1
|
version: 2.1.5
|
||||||
dependencies:
|
dependencies:
|
||||||
analyzer: ">=0.32.0"
|
analyzer: ">=0.32.0"
|
||||||
args: ^1.0.0
|
args: ^1.0.0
|
||||||
|
|
Loading…
Reference in a new issue