Natalie Weizenbaum
2430ac6d20
Avoid creating zone variables inside _EvaluateVisitor
...
Instead, we create a single zone-scoped object that's visible for the
entire lifespan of the visitor, and which exposes evaluation internals
which can be updated as direct field modifications.
2021-10-20 16:36:52 -07:00
Natalie Weizenbaum
57ea9f1a90
Expose getters indicating which color fields a color has calculated ( #1453 )
...
These getters are only available through the sass_api package. This
will allow the Sass embedded compiler to more explicitly send the
color information it has on hand.
2021-08-28 07:37:39 +00:00
Natalie Weizenbaum
9f3133a179
Fix dartdoc errors
...
Also fix a couple places where our external API wasn't quite right.
2021-07-30 15:14:17 -07:00
Natalie Weizenbaum
a28c656049
Add dartdoc categories to Sass APIs
2021-07-30 14:29:51 -07:00
Natalie Weizenbaum
43b69e60a0
Change CompileResult.includedFiles to CompileResult.includedUrls
...
Rather than constructing this explicitly to match Node Sass's API, we
construct it with canonical URLs and convert it into the format
expected by the Node Sass API (a mix of paths and URLs) in the
compatibility layer.
2021-07-13 18:08:18 -07:00
Natalie Weizenbaum
a10d7c677d
Use @internal to cordon off internal-only Value APIs ( #1379 )
...
Lays the groundwork for #236
Note that we need to add a bunch of explicit @nodoc annotations to
work around dart-lang/dartdoc#2418 and dart-lang/dartdoc#2419 .
2021-06-24 17:32:57 -07:00
Natalie Weizenbaum
16f181660c
Only omit 5 deprecation warnings per feature by default ( #1327 )
...
Closes #1323
2021-05-21 22:45:58 -07:00
Natalie Weizenbaum
d660bf12ef
Add an option to the CLI and Dart Sass to silence warnings from deps
...
Closes #672
2021-05-21 22:45:58 -07:00
Natalie Weizenbaum
81d952dc7d
Automated null-safety migration
2021-04-14 17:15:08 -07:00
Jennifer Thakar
dfbdae0d71
Prepare for null-safety migration
2021-04-14 17:15:08 -07:00
Natalie Weizenbaum
8fdb281e83
Make the first parameter to ImportCache() named, not mandatory
...
It was always valid to pass in `null`, this just makes it more clear.
2021-04-14 17:15:08 -07:00
Jennifer Thakar
247cb3d816
Update dependencies to null-safe versions
...
This also replaces package_resolver with package_config, since
package_resolver is archived and is incompatible with null-safe Dart
packages.
2021-04-12 17:31:09 -07:00
Michael R Fairhurst
82b2779d5c
Remove unused dart:async imports ( #1097 )
...
* Remove unused dart:async imports
Since Dart 2.1, Future and Stream have been exported from dart:core
* Run grinder
2020-10-05 09:35:03 -07:00
Natalie Weizenbaum
20978e0320
Fix new strict inference hints from Dart 2.6
2019-11-06 14:47:24 -08:00
Natalie Weizenbaum
bea609d74b
Add a top-level warn() function for functions and importers ( #711 )
...
In addition to being useful for users of Sass, this will make it
possible for core Sass functions to produce warnings without needing
an explicit reference to the evaluator.
2019-06-06 19:42:44 +01:00
Natalie Weizenbaum
3b3a43a8f9
Add a --charset flag and API option ( #644 )
...
The automatic @charset adding is useful in general, but there are
consistently cases where it trips up naïve downstream tools. This
option makes it easier for users to control when it occurs.
2019-04-08 14:49:08 -07:00
Natalie Weizenbaum
a09a62538e
Remove extra importer parameters from internal compile functions
...
These can be passed as an ImportCache now, so they make the API more
confusing for relatively little benefit.
This also changes the const AsyncImportCache.none field to a non-const
AsyncImportCache.none() constructor. The const field didn't make sense
for a couple reasons: first, it wouldn't use a user's custom logger;
and second, it couldn't cache any relative imports, which were still
possible when the initial file was loaded from disk.
2018-12-12 15:54:32 -08:00
Natalie Weizenbaum
487e5025ff
Reformat with Dart-2-only features
2018-11-15 15:16:24 -08:00
Natalie Weizenbaum
77563be056
Add support for SASS_PATH ( #514 )
...
Closes #512
2018-11-05 15:24:14 -08:00
Natalie Weizenbaum
874ee0b076
Expose the SassException class publicly ( #446 )
2018-08-14 12:58:47 -07:00
Natalie Weizenbaum
0f7f9e69a7
Add support for plain CSS imports ( #436 )
...
Closes #424
2018-08-10 15:58:15 -07:00
Natalie Weizenbaum
5b9765c833
Add an ImportCache
...
This will allow cached imports to be shared outside of the context of
a single stylesheet compilation.
2018-05-24 14:31:07 -04:00
Natalie Weizenbaum
fd19bc85b6
Add a JavaScript API for source map generation ( #302 )
...
Partially addresses #2
2018-04-20 17:56:00 -07:00
Natalie Weizenbaum
9ea001598a
Add a Dart API for source map generation ( #299 )
...
Partially addresses #2
2018-04-19 16:51:20 -07:00
Natalie Weizenbaum
74cfe29814
Remove the deprecated render() function ( #270 )
2018-03-26 12:45:43 -07:00
Natalie Weizenbaum
5cc3238d4a
Explicitly recommend importing the Dart library with a prefix ( #262 )
2018-03-20 15:43:02 -07:00
Natalie Weizenbaum
4c6494c288
Add a Logger class to control how output is emitted
2018-03-11 21:05:34 -07:00
Natalie Weizenbaum
8d7964e9be
Add a compressed output style and pipe it through to the executable
2018-01-21 13:15:55 -08:00
Natalie Weizenbaum
1e09cec5aa
Split Value and its subtypes into public and private interfaces ( #210 )
2018-01-13 01:30:42 -08:00
Natalie Weizenbaum
8988c3c7fa
Expose an API for defining custom Dart functions
2018-01-13 00:34:54 -08:00
Natalie Weizenbaum
74400dc4a4
Add asynchronous versions of several evaluation-related libraries
...
This allows us to support asynchronous importers and, eventually,
functions without breaking synchronous support. The copies were made
manually, but the eventual plan is to auto-generate the synchronous
versions by stripping all asynchrony from the async versions.
See #9
2017-12-01 14:29:11 -08:00
Natalie Weizenbaum
40bcf98e0c
Add exports to importer.dart
...
This matches the APIs of other sub-directories.
2017-11-03 14:42:05 -07:00
Natalie Weizenbaum
a003e5c31f
Expose a Dart API for importers
...
Closes #172
2017-10-12 21:54:58 -07:00
Natalie Weizenbaum
214a2af2e9
Fully support the return value for the Node render() functions ( #165 )
...
Closes #11
2017-07-09 14:52:14 -07:00
Natalie Weizenbaum
970755d82e
Rename "render" to "compile"
...
"Render" is a strange term for compilation that kind of got copied
over from Haml and endured due to inertia.
2017-07-07 17:53:03 -07:00
Natalie Weizenbaum
8f836df66c
Add support for the data option to the JS API ( #159 )
...
Also add renderString to the Dart API.
Partially addresses #7
2017-07-07 00:57:10 -07:00
Sam Rawlins
457a333727
Add indentType and indentWidth parameters ( #136 )
...
See #8
2017-06-02 15:42:22 -07:00
Natalie Weizenbaum
231a85be38
Improve Node file load speed. ( #110 )
2017-02-04 12:20:34 -08:00
Luis Vargas
cfc3a15041
Support package: URLs as a Dart library ( #53 )
2017-02-03 01:08:06 -08:00
Natalie Weizenbaum
d7caf7fbc1
Gracefully handle invalid UTF-8.
...
This will be even more graceful when dart-lang/sdk#28293 is fixed.
2017-01-06 21:31:29 -08:00
Natalie Weizenbaum
7b4d26cc5a
Properly parse indented-syntax empty selectors.
...
Also warn about them.
2016-10-20 14:35:45 -07:00
Natalie Weizenbaum
38f15a96f3
Expose _PerformVisitor as a top-level function.
2016-10-15 14:31:21 -07:00
Natalie Weizenbaum
a2889e4a75
Start supporting public Dart and Node APIs.
2016-10-14 18:24:50 -07:00