mirror of
https://github.com/danog/dart-sass.git
synced 2025-01-21 21:31:11 +01:00
Reformat.
This commit is contained in:
parent
4e529451f5
commit
3b36c5a1fb
@ -23,8 +23,7 @@ Future deleteDirectory(String path) =>
|
|||||||
///
|
///
|
||||||
/// Returns the result of [expression] if it's JSON-serializable.
|
/// Returns the result of [expression] if it's JSON-serializable.
|
||||||
Future runHybridExpression(String expression, [message]) async {
|
Future runHybridExpression(String expression, [message]) async {
|
||||||
var channel = spawnHybridCode(
|
var channel = spawnHybridCode('''
|
||||||
'''
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
@ -49,8 +48,7 @@ Future runHybridExpression(String expression, [message]) async {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
''',
|
''', message: message);
|
||||||
message: message);
|
|
||||||
|
|
||||||
return JSON.decode((await channel.stream.first) as String);
|
return JSON.decode((await channel.stream.first) as String);
|
||||||
}
|
}
|
||||||
|
@ -67,7 +67,8 @@ js() {
|
|||||||
];
|
];
|
||||||
if (Platform.environment["SASS_MINIFY_JS"] != "false") args.add("--minify");
|
if (Platform.environment["SASS_MINIFY_JS"] != "false") args.add("--minify");
|
||||||
|
|
||||||
Dart2js.compile(new File('bin/sass.dart'), outFile: destination, extraArgs: args);
|
Dart2js.compile(new File('bin/sass.dart'),
|
||||||
|
outFile: destination, extraArgs: args);
|
||||||
var text = destination.readAsStringSync();
|
var text = destination.readAsStringSync();
|
||||||
destination.writeAsStringSync(preamble.getPreamble() + text);
|
destination.writeAsStringSync(preamble.getPreamble() + text);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user