mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-26 20:24:42 +01:00
parent
5466dd76a2
commit
db1e1261bd
@ -5,6 +5,11 @@
|
|||||||
* Add an optional `argumentName` parameter to `SassScriptException()` to make it
|
* Add an optional `argumentName` parameter to `SassScriptException()` to make it
|
||||||
easier to throw exceptions associated with particular argument names.
|
easier to throw exceptions associated with particular argument names.
|
||||||
|
|
||||||
|
### JS API
|
||||||
|
|
||||||
|
* Fix a bug in which certain warning spans would not have their properties
|
||||||
|
accessible by the JS API.
|
||||||
|
|
||||||
## 1.54.9
|
## 1.54.9
|
||||||
|
|
||||||
* Fix an incorrect span in certain `@media` query deprecation warnings.
|
* Fix an incorrect span in certain `@media` query deprecation warnings.
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
import 'package:source_span/source_span.dart';
|
import 'package:source_span/source_span.dart';
|
||||||
|
|
||||||
|
import '../util/multi_span.dart';
|
||||||
import '../util/nullable.dart';
|
import '../util/nullable.dart';
|
||||||
import 'reflection.dart';
|
import 'reflection.dart';
|
||||||
import 'utils.dart';
|
import 'utils.dart';
|
||||||
@ -12,14 +13,17 @@ import 'utils.dart';
|
|||||||
/// that they match the JS API.
|
/// that they match the JS API.
|
||||||
void updateSourceSpanPrototype() {
|
void updateSourceSpanPrototype() {
|
||||||
var span = SourceFile.fromString('').span(0);
|
var span = SourceFile.fromString('').span(0);
|
||||||
|
var multiSpan = MultiSpan(span, '', {});
|
||||||
|
|
||||||
getJSClass(span).defineGetters({
|
for (var item in [span, multiSpan]) {
|
||||||
'start': (FileSpan span) => span.start,
|
getJSClass(item).defineGetters({
|
||||||
'end': (FileSpan span) => span.end,
|
'start': (FileSpan span) => span.start,
|
||||||
'url': (FileSpan span) => span.sourceUrl.andThen(dartToJSUrl),
|
'end': (FileSpan span) => span.end,
|
||||||
'text': (FileSpan span) => span.text,
|
'url': (FileSpan span) => span.sourceUrl.andThen(dartToJSUrl),
|
||||||
'context': (FileSpan span) => span.context,
|
'text': (FileSpan span) => span.text,
|
||||||
});
|
'context': (FileSpan span) => span.context,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Offset is already accessible from JS because it's defined as a field rather
|
// Offset is already accessible from JS because it's defined as a field rather
|
||||||
// than a getter.
|
// than a getter.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
name: sass
|
name: sass
|
||||||
version: 1.55.0
|
version: 1.55.0-dev
|
||||||
description: A Sass implementation in Dart.
|
description: A Sass implementation in Dart.
|
||||||
homepage: https://github.com/sass/dart-sass
|
homepage: https://github.com/sass/dart-sass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user