mirror of
https://github.com/danog/dart-sass.git
synced 2024-11-30 04:39:03 +01:00
Remove the source map comment from the JS blob we release (#448)
See bazelbuild/rules_sass#44
This commit is contained in:
parent
3346c7974a
commit
c5dff3e841
@ -5,6 +5,11 @@
|
||||
* Add a `SassException` type that provides information about Sass compilation
|
||||
failures.
|
||||
|
||||
### JS API
|
||||
|
||||
* Remove the source map comment from the compiled JS. We don't ship with the
|
||||
source map, so this pointed to nothing.
|
||||
|
||||
## 1.11.0
|
||||
|
||||
* Add support for importing plain CSS files. They can only be imported *without*
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: sass
|
||||
version: 1.12.0-dev
|
||||
version: 1.12.0
|
||||
description: A Sass implementation in Dart.
|
||||
author: Dart Team <misc@dartlang.org>
|
||||
homepage: https://github.com/sass/dart-sass
|
||||
|
@ -40,6 +40,13 @@ void _js({@required bool release}) {
|
||||
Dart2js.compile(new File('bin/sass.dart'),
|
||||
outFile: destination, extraArgs: args);
|
||||
var text = destination.readAsStringSync();
|
||||
|
||||
if (release) {
|
||||
// We don't ship the source map, so remove the source map comment.
|
||||
text = text.replaceFirst(
|
||||
new RegExp(r"\n*//# sourceMappingURL=[^\n]+\n*$"), "\n");
|
||||
}
|
||||
|
||||
destination.writeAsStringSync(preamble.getPreamble() + text);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user