sass 1.45.0-rc.1 → 1.45.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE CHANGED
@@ -247,8 +247,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
247
247
 
248
248
  --------------------------------------------------------------------------------
249
249
 
250
- charcode, http_parser, oauth2, path, pool, shelf_web_socket, source_maps,
251
- source_span, stack_trace, string_scanner and yaml license:
250
+ charcode, http_parser, oauth2, pool, shelf_web_socket, source_maps, source_span,
251
+ stack_trace, string_scanner and yaml license:
252
252
 
253
253
  Copyright 2014, the Dart project authors. All rights reserved.
254
254
  Redistribution and use in source and binary forms, with or without
@@ -821,7 +821,8 @@ coverage and quiver license:
821
821
 
822
822
  --------------------------------------------------------------------------------
823
823
 
824
- dart_style, glob, http, matcher, pub_semver, shelf, test and watcher license:
824
+ dart_style, glob, http, matcher, path, pub_semver, shelf, test and watcher
825
+ license:
825
826
 
826
827
  Copyright 2014, the Dart project authors.
827
828
 
package/README.md CHANGED
@@ -25,7 +25,6 @@ executable and a Node.js API.
25
25
  [Dart Sass]: https://github.com/sass/dart-sass
26
26
 
27
27
  * [Usage](#usage)
28
- * [API](#api)
29
28
  * [See Also](#see-also)
30
29
  * [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass)
31
30
 
@@ -39,59 +38,65 @@ library:
39
38
  [npm]: https://www.npmjs.com/package/sass
40
39
 
41
40
  ```js
42
- var sass = require('sass');
41
+ const sass = require('sass');
43
42
 
44
- sass.render({file: scss_filename}, function(err, result) { /* ... */ });
43
+ const result = sass.compile(scssFilename);
45
44
 
46
45
  // OR
47
46
 
48
- var result = sass.renderSync({file: scss_filename});
47
+ // Note that `compileAsync()` is substantially slower than `compile()`.
48
+ const result = await sass.compileAsync(scssFilename);
49
49
  ```
50
50
 
51
- [See below](#api) for details on Dart Sass's JavaScript API.
51
+ See [the Sass website][js api] for full API documentation.
52
52
 
53
- ## API
53
+ [js api]: https://sass-lang.com/documentation/js-api
54
+
55
+ ### Legacy API
54
56
 
55
- When installed via npm, Dart Sass supports a JavaScript API that's fully
56
- compatible with [Node Sass][] (with a few exceptions listed below), with support
57
- for both the `render()` and `renderSync()` functions. See [the Sass
58
- website][js api] for full API documentation!
57
+ Dart Sass also supports an older JavaScript API that's fully compatible with
58
+ [Node Sass] (with a few exceptions listed below), with support for both the
59
+ [`render()`] and [`renderSync()`] functions. This API is considered deprecated
60
+ and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects.
59
61
 
60
62
  [Node Sass]: https://github.com/sass/node-sass
61
- [js api]: https://sass-lang.com/documentation/js-api
63
+ [`render()`]: https://sass-lang.com/documentation/js-api/modules#render
64
+ [`renderSync()`]: https://sass-lang.com/documentation/js-api/modules#renderSync
65
+
66
+ Sass's support for the legacy JavaScript API has the following limitations:
62
67
 
63
- Note however that **`renderSync()` is more than twice as fast as `render()`**
64
- due to the overhead of asynchronous callbacks. Both `render()` and
65
- `renderSync()` support the following options:
66
-
67
- * [`data`](https://github.com/sass/node-sass#data)
68
- * [`file`](https://github.com/sass/node-sass#file)
69
- * [`functions`](https://github.com/sass/node-sass#functions--v300---experimental)
70
- * [`importer`](https://github.com/sass/node-sass#importer--v200---experimental)
71
- * [`includePaths`](https://github.com/sass/node-sass#includepaths)
72
- * [`indentType`](https://github.com/sass/node-sass#indenttype)
73
- * [`indentWidth`](https://github.com/sass/node-sass#indentwidth)
74
- * [`indentedSyntax`](https://github.com/sass/node-sass#indentedsyntax)
75
- * [`linefeed`](https://github.com/sass/node-sass#linefeed)
76
- * [`omitSourceMapUrl`](https://github.com/sass/node-sass#omitsourcemapurl)
77
- * [`outFile`](https://github.com/sass/node-sass#outfile)
78
- * [`sourceMapContents`](https://github.com/sass/node-sass#sourcemapcontents)
79
- * [`sourceMapEmbed`](https://github.com/sass/node-sass#sourcemapembed)
80
- * [`sourceMapRoot`](https://github.com/sass/node-sass#sourcemaproot)
81
- * [`sourceMap`](https://github.com/sass/node-sass#sourcemap)
82
- * Only the `"expanded"` and `"compressed"` values of
83
- [`outputStyle`](https://github.com/sass/node-sass#outputstyle) are supported.
84
- * `charset` (`true`, the default, will prefix non-ASCII CSS with `U+FEFF` or
85
- [`@charset "UTF-8";`](https://developer.mozilla.org/en-US/docs/Web/CSS/@charset))
86
-
87
- No support is intended for the following options:
88
-
89
- * [`precision`](https://github.com/sass/node-sass#precision). Dart Sass defaults
90
- to a sufficiently high precision for all existing browsers, and making this
68
+ * Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are
69
+ supported.
70
+
71
+ * Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a
72
+ sufficiently high precision for all existing browsers, and making this
91
73
  customizable would make the code substantially less efficient.
92
74
 
93
- * [`sourceComments`](https://github.com/sass/node-sass#sourcecomments). Source
94
- maps are the recommended way of locating the origin of generated selectors.
75
+ * Dart Sass doesn't support the [`sourceComments`] option. Source maps are the
76
+ recommended way of locating the origin of generated selectors.
77
+
78
+ [`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle
79
+ [`precision`]: https://github.com/sass/node-sass#precision
80
+ [`sourceComments`]: https://github.com/sass/node-sass#sourcecomments
81
+
82
+ ### From Pub
83
+
84
+ If you're a Dart user, you can install Dart Sass globally using `pub global
85
+ activate sass`, which will provide a `sass` executable. You can also add it to
86
+ your pubspec and use it as a library. We strongly recommend importing it with
87
+ the prefix `sass`:
88
+
89
+ ```dart
90
+ import 'package:sass/sass.dart' as sass;
91
+
92
+ void main(List<String> args) {
93
+ print(sass.compile(args.first));
94
+ }
95
+ ```
96
+
97
+ See [the Dart API docs][api] for details.
98
+
99
+ [api]: https://www.dartdocs.org/documentation/sass/latest/sass/sass-library.html
95
100
 
96
101
  ## See Also
97
102
 
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=8.9.0"},"dependencies":{"chokidar":">=3.0.0 <4.0.0","immutable":"^4.0.0"},"keywords":["style","scss","sass","preprocessor","css"],"version":"1.45.0-rc.1","bin":{"sass":"sass.js"},"main":"sass.default.dart.js","exports":{"default":"./sass.default.dart.js"}}
1
+ {"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=8.9.0"},"dependencies":{"chokidar":">=3.0.0 <4.0.0","immutable":"^4.0.0","source-map-js":">=0.6.2 <2.0.0"},"keywords":["style","scss","sass","preprocessor","css"],"types":"types/index.d.ts","version":"1.45.2","bin":{"sass":"sass.js"},"main":"sass.default.dart.js","exports":{"default":"./sass.default.dart.js"}}