Encourage hot reload

This commit is contained in:
thosakwe 2017-06-06 08:23:28 -04:00
parent 0df2157300
commit 1af44cab90
3 changed files with 12 additions and 4 deletions

View file

@ -34,6 +34,14 @@ class StartCommand extends Command {
@override
run() async {
stderr
..writeln(
'WARNING: `angel start` is now deprecated, in favor of `package:angel_hot`.')
..writeln(
'This new alternative supports hot reloading, which is faster and more reliable.')
..writeln()
..writeln('Find it on Pub: https://pub.dartlang.org/packages/angel_hot');
if (argResults['watch']) {
try {
new DirectoryWatcher('bin').events.listen((_) async => start());
@ -76,8 +84,8 @@ class StartCommand extends Command {
if (scriptsNode != null && scriptsNode.containsKey('start')) {
try {
var scripts =
await Process.start(InitCommand.resolvePub(), ['global', 'run', 'scripts', 'start']);
var scripts = await Process.start(
InitCommand.resolvePub(), ['global', 'run', 'scripts', 'start']);
listen(scripts.stdout, stdout);
listen(scripts.stderr, stderr);
int code = await scripts.exitCode;

View file

@ -3,7 +3,7 @@ import 'dart:convert';
import 'package:http/src/base_client.dart' as http;
import 'package:pub_semver/pub_semver.dart';
final Version PACKAGE_VERSION = new Version(1, 0, 12);
final Version PACKAGE_VERSION = new Version(1, 1, 0);
Future<Version> fetchCurrentVersion(http.BaseClient client) async {
var response =
await client.get('https://pub.dartlang.org/api/packages/angel_cli');

View file

@ -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.0.12
version: 1.1.0
dependencies:
# analyzer: "^0.29.0"
args: "^0.13.7"