Disable if need be
This commit is contained in:
parent
cf0c3c9262
commit
18c06142a9
4 changed files with 16 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="server.dart" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true" nameIsGenerated="true">
|
||||
<option name="VMOptions" value="--enable-vm-service" />
|
||||
<option name="VMOptions" value="--observe" />
|
||||
<option name="filePath" value="$PROJECT_DIR$/example/basic/server.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$/example/basic" />
|
||||
<method />
|
||||
|
|
7
.idea/runConfigurations/server_dart__No_VM_service_.xml
Normal file
7
.idea/runConfigurations/server_dart__No_VM_service_.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="server.dart (No VM service)" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application" singleton="true">
|
||||
<option name="filePath" value="$PROJECT_DIR$/example/basic/server.dart" />
|
||||
<option name="workingDirectory" value="$PROJECT_DIR$/example/basic" />
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
|
@ -132,6 +132,13 @@ class HotReloader {
|
|||
}
|
||||
|
||||
_listenToFilesystem() async {
|
||||
if (!Platform.executableArguments.contains('--observe') &&
|
||||
!Platform.executableArguments.contains('--enable-vm-service')) {
|
||||
stderr.writeln(
|
||||
'WARNING: You have instantiated a HotReloader without passing `--enable-vm-service` or `--observe` to the Dart VM. Hot reloading will be disabled.');
|
||||
return;
|
||||
}
|
||||
|
||||
for (var path in _paths) {
|
||||
if (path is String) {
|
||||
await _listenToStat(path);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
name: angel_hot
|
||||
description: Supports hot reloading of Angel servers on file changes.
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/hot
|
||||
environment:
|
||||
|
|
Loading…
Reference in a new issue