mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 11:03:19 +00:00
Flip dartfmt to run in Dart 2 mode.
Change-Id: I245dce2510ccf99cd443b4d27828790dabe54e8a Reviewed-on: https://dart-review.googlesource.com/56283 Commit-Queue: Bob Nystrom <rnystrom@google.com> Reviewed-by: Vijay Menon <vsm@google.com>
This commit is contained in:
parent
ade600c4b3
commit
7c59fe6332
|
@ -28,4 +28,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
|
|||
|
||||
DARTFMT="$DART_ROOT/third_party/pkg_tested/dart_style/bin/format.dart"
|
||||
|
||||
exec "$DART" "--packages=$DART_ROOT/.packages" "$DARTFMT" "$@"
|
||||
exec "$DART" "--preview-dart-2" "--packages=$DART_ROOT/.packages" "$DARTFMT" "$@"
|
||||
|
|
|
@ -27,7 +27,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
|
|||
|
||||
set DARTFMT=%DART_ROOT%\third_party\pkg_tested\dart_style\bin\format.dart
|
||||
|
||||
"%DART%" "--packages=%DART_ROOT%\.packages" "%DARTFMT%" %*
|
||||
"%DART%" "--preview-dart-2" "--packages=%DART_ROOT%\.packages" "%DARTFMT%" %*
|
||||
|
||||
endlocal
|
||||
|
||||
|
|
|
@ -26,4 +26,4 @@ SNAPSHOT="$BIN_DIR/snapshots/dartfmt.dart.snapshot"
|
|||
|
||||
# We are running the snapshot in the built SDK.
|
||||
DART="$BIN_DIR/dart"
|
||||
exec "$DART" "$SNAPSHOT" "$@"
|
||||
exec "$DART" "--preview-dart-2" "$SNAPSHOT" "$@"
|
||||
|
|
|
@ -14,7 +14,7 @@ for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
|
|||
set DART=%BIN_DIR%\dart
|
||||
set SNAPSHOT=%BIN_DIR%\snapshots\dartfmt.dart.snapshot
|
||||
|
||||
"%DART%" "%SNAPSHOT%" %*
|
||||
"%DART%" "--preview-dart-2" "%SNAPSHOT%" %*
|
||||
|
||||
endlocal
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
import("../application_snapshot.gni")
|
||||
|
||||
application_snapshot("dartfmt") {
|
||||
dart_version = 2
|
||||
main_dart = "../../third_party/pkg_tested/dart_style/bin/format.dart"
|
||||
training_args = [ "--help" ]
|
||||
|
||||
# Train it on formatting its own source.
|
||||
training_args = [ "../../third_party/pkg_tested/dart_style" ]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue