mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-26 20:24:42 +01:00
Run snapshots in Dart 1 mode
Until dart-lang/sdk#33257 is fixed, this ensures that users get as much performance as possible.
This commit is contained in:
parent
f9f0d0e5da
commit
c462b82102
@ -11,4 +11,4 @@ echo "WARNING: The dart-sass executable is deprecated, use sass instead."
|
||||
|
||||
set SCRIPTPATH=%~dp0
|
||||
set arguments=%*
|
||||
"%SCRIPTPATH%\src\dart.exe" "-Dversion=SASS_VERSION" "%SCRIPTPATH%\src\sass.dart.snapshot" %arguments%
|
||||
"%SCRIPTPATH%\src\dart.exe" --no-preview-dart-2 "-Dversion=SASS_VERSION" "%SCRIPTPATH%\src\sass.dart.snapshot" %arguments%
|
||||
|
@ -22,4 +22,4 @@ fi
|
||||
|
||||
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
|
||||
path=`dirname "$(follow_links "$BASH_SOURCE")"`
|
||||
exec "$path/src/dart" "-Dversion=SASS_VERSION" "$path/src/sass.dart.snapshot" "$@"
|
||||
exec "$path/src/dart" --no-preview-dart-2 "-Dversion=SASS_VERSION" "$path/src/sass.dart.snapshot" "$@"
|
||||
|
@ -9,4 +9,4 @@ REM grinder package`.
|
||||
|
||||
set SCRIPTPATH=%~dp0
|
||||
set arguments=%*
|
||||
"%SCRIPTPATH%\src\dart.exe" "-Dversion=SASS_VERSION" "%SCRIPTPATH%\src\sass.dart.snapshot" %arguments%
|
||||
"%SCRIPTPATH%\src\dart.exe" --no-preview-dart-2 "-Dversion=SASS_VERSION" "%SCRIPTPATH%\src\sass.dart.snapshot" %arguments%
|
||||
|
@ -18,4 +18,4 @@ follow_links() {
|
||||
|
||||
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
|
||||
path=`dirname "$(follow_links "$0")"`
|
||||
exec "$path/src/dart" "-Dversion=SASS_VERSION" "$path/src/sass.dart.snapshot" "$@"
|
||||
exec "$path/src/dart" --no-preview-dart-2 "-Dversion=SASS_VERSION" "$path/src/sass.dart.snapshot" "$@"
|
||||
|
@ -8,7 +8,7 @@ executables:
|
||||
dart-sass: sass
|
||||
|
||||
environment:
|
||||
sdk: '>=1.25.0-dev.63.0 <2.0.0'
|
||||
sdk: '>=1.25.0-dev.64.0 <2.0.0'
|
||||
|
||||
dependencies:
|
||||
args: ">=1.4.0 <2.0.0"
|
||||
|
@ -50,7 +50,7 @@ Future<TestProcess> runSass(Iterable<String> arguments) {
|
||||
(path) => new File(path).existsSync(),
|
||||
orElse: () => p.absolute("bin/sass.dart"));
|
||||
|
||||
var args = ["--checked"];
|
||||
var args = ["--no-preview-dart-2", "--checked"];
|
||||
|
||||
// Work around dart-lang/sdk#33622.
|
||||
if (Platform.isWindows) args.add("--packages=${p.absolute('.packages')}");
|
||||
|
@ -19,7 +19,8 @@ bool get _is64Bit => Platform.version.contains("x64");
|
||||
@Task('Build Dart script snapshot.')
|
||||
snapshot() {
|
||||
ensureBuild();
|
||||
Dart.run('bin/sass.dart', vmArgs: ['--snapshot=build/sass.dart.snapshot']);
|
||||
Dart.run('bin/sass.dart',
|
||||
vmArgs: ['--no-preview-dart-2', '--snapshot=build/sass.dart.snapshot']);
|
||||
}
|
||||
|
||||
@Task('Build a dev-mode Dart application snapshot.')
|
||||
@ -34,6 +35,9 @@ releaseAppSnapshot() => _appSnapshot(release: true);
|
||||
/// compiles in unchecked mode.
|
||||
void _appSnapshot({@required bool release}) {
|
||||
var args = [
|
||||
// Don't build in Dart 2 runtime mode for now because it's substantially
|
||||
// slower than Dart 1 mode. See dart-lang/sdk#33257.
|
||||
'--no-preview-dart-2',
|
||||
'--snapshot=build/sass.dart.app.snapshot',
|
||||
'--snapshot-kind=app-jit'
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user