Skip to content

Commit 7bfb155

Browse files
committed
Update template's dependencies
Signed-off-by: GZGavinZhao <74938940+GZGavinZhao@users.noreply.github.com>
1 parent d60ddf6 commit 7bfb155

File tree

15 files changed

+170
-136
lines changed

15 files changed

+170
-136
lines changed

lib/src/ngdart_command_runner.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ class NgdartCommandRunner extends CommandRunner<int> {
1818
) {
1919
argParser.addFlag(
2020
'version',
21-
abbr: 'v',
2221
negatable: false,
2322
help: 'Prints the version of ngdart.',
2423
);
2524
argParser.addFlag(
2625
'verbose',
26+
abbr: 'v',
2727
negatable: false,
2828
help: 'Show additional command output',
2929
);

lib/src/templates/new_project.g.dart

Lines changed: 126 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/util/builder.dart

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import 'dart:convert';
33
import 'dart:math' as math;
44

55
import 'package:build/build.dart';
6+
import 'package:dart_style/dart_style.dart' show DartFormatter;
67
import 'package:glob/glob.dart';
78
import 'package:path/path.dart' as p;
89

@@ -47,13 +48,15 @@ class _TemplateBuilder implements Builder {
4748

4849
await buildStep.writeAsString(
4950
targetFile,
50-
'''
51+
DartFormatter().format(
52+
'''
5153
// Generated code. Do not modify by hand (unless you know what you're doing).
5254
5355
part of '$name.dart';
5456
5557
const _data = <String>[$items];
5658
''',
59+
),
5760
);
5861
}
5962

lib/src/util/logger.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'package:ansicolor/ansicolor.dart';
22
import 'package:cli_util/cli_logging.dart';
33

4-
late final Logger logger;
4+
Logger logger = Logger.standard(ansi: Ansi(true));
55

66
void error(String message) {
77
final AnsiPen pen = AnsiPen()..xterm(160);
@@ -20,5 +20,6 @@ void success(String message) {
2020

2121
void trace(String message) {
2222
final AnsiPen pen = AnsiPen()..xterm(045);
23-
logger.trace('${pen('[Trace]')} $message');
23+
// logger.trace('${pen('[Trace]')} $message');
24+
logger.trace(message);
2425
}

lib/src/version.dart

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pubspec.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ packages:
163163
source: hosted
164164
version: "3.0.1"
165165
dart_style:
166-
dependency: transitive
166+
dependency: "direct main"
167167
description:
168168
name: dart_style
169169
url: "https://pub.dartlang.org"

pubspec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: ngdart
22
description: A command-line tool for creating and managing AngularDart projects.
3-
version: 1.0.2
3+
version: 1.1.0
44
homepage: https://github.com/GZGavinZhao/ngdart
55
repository: https://github.com/GZGavinZhao/ngdart
66
executables:
@@ -14,6 +14,7 @@ dependencies:
1414
args: ^2.3.0
1515
build: ^2.2.1
1616
cli_util: ^0.3.5
17+
dart_style: ^2.2.1
1718
glob: ^2.0.2
1819
path: ^1.8.1
1920
yaml: ^3.1.0

templates/new_project/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# __projectName__
22

3-
A web app that uses [AngularDart](https://angulardart.dev) and
4-
[AngularDart Components](https://angulardart.dev/components).
3+
A web app that uses [AngularDart](https://angulardart.xyz) and
4+
[AngularDart Components](https://pub.dev/ngcomponents).
55

66
Created from templates made available by Stagehand under a BSD-style
77
[license](https://github.com/dart-lang/stagehand/blob/master/LICENSE).

templates/new_project/lib/app_component.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@ import 'package:angular/angular.dart';
22

33
import 'src/todo_list/todo_list_component.dart';
44

5-
// AngularDart info: https://angulardart.dev
6-
// Components info: https://angulardart.dev/components
5+
// AngularDart info: https://angulardart.xyz
6+
// Components info: https://angulardart.xyz/components
7+
//
8+
// (If the links still point to the old Dart-lang repo, go here:
9+
// https://pub.dev/ngcomponents)
710

811
@Component(
912
selector: 'my-app',

0 commit comments

Comments
 (0)