Comparing version 1.69.5 to 1.25.0
@@ -1,1 +0,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":">=14.0.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","exports":{"types":"./types/index.d.ts","node":{"require":"./sass.node.js","default":"./sass.node.mjs"},"default":{"require":"./sass.default.cjs","default":"./sass.default.js"}},"version":"1.69.5","bin":{"sass":"sass.js"},"main":"sass.node.js"} | ||
{"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":">=2.0.0 <4.0.0"},"main":"sass.dart.js","bin":"sass.js","keywords":["style","scss","sass","preprocessor","css"],"version":"1.25.0"} |
@@ -12,3 +12,3 @@ A pure JavaScript implementation of [Sass][sass]. **Sass makes CSS fun again**. | ||
<td valign="middle"> | ||
<a href="https://github.com/sass/dart-sass/actions"><img alt="GitHub actions build status" src="https://github.com/sass/dart-sass/workflows/CI/badge.svg"></a> | ||
<a href="https://travis-ci.org/sass/dart-sass"><img alt="Travis build status" src="https://api.travis-ci.org/sass/dart-sass.svg?branch=master"></a> | ||
<br> | ||
@@ -29,2 +29,3 @@ <a href="https://ci.appveyor.com/project/nex3/dart-sass"><img alt="Appveyor build status" src="https://ci.appveyor.com/api/projects/status/84rl9hvu8uoecgef?svg=true"></a> | ||
* [Usage](#usage) | ||
* [API](#api) | ||
* [See Also](#see-also) | ||
@@ -43,43 +44,75 @@ * [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass) | ||
```js | ||
const sass = require('sass'); | ||
var sass = require('sass'); | ||
const result = sass.compile(scssFilename); | ||
sass.render({file: scss_filename}, function(err, result) { /* ... */ }); | ||
// OR | ||
// Note that `compileAsync()` is substantially slower than `compile()`. | ||
const result = await sass.compileAsync(scssFilename); | ||
var result = sass.renderSync({file: scss_filename}); | ||
``` | ||
See [the Sass website][js api] for full API documentation. | ||
[See below](#api) for details on Dart Sass's JavaScript API. | ||
## API | ||
When installed via npm, Dart Sass supports a JavaScript API that's fully | ||
compatible with [Node Sass][] (with a few exceptions listed below), with support | ||
for both the `render()` and `renderSync()` functions. See [the Sass | ||
website][js api] for full API documentation! | ||
[Node Sass]: https://github.com/sass/node-sass | ||
[js api]: https://sass-lang.com/documentation/js-api | ||
### Legacy API | ||
Note however that by default, **`renderSync()` is more than twice as fast as | ||
`render()`** due to the overhead of asynchronous callbacks. To avoid this | ||
performance hit, `render()` can use the [`fibers`][fibers] package to call | ||
asynchronous importers from the synchronous code path. To enable this, pass the | ||
`Fiber` class to the `fiber` option: | ||
Dart Sass also supports an older JavaScript API that's fully compatible with | ||
[Node Sass] (with a few exceptions listed below), with support for both the | ||
[`render()`] and [`renderSync()`] functions. This API is considered deprecated | ||
and will be removed in Dart Sass 2.0.0, so it should be avoided in new projects. | ||
[fibers]: https://www.npmjs.com/package/fibers | ||
[Node Sass]: https://github.com/sass/node-sass | ||
[`render()`]: https://sass-lang.com/documentation/js-api/functions/render | ||
[`renderSync()`]: https://sass-lang.com/documentation/js-api/functions/renderSync | ||
```js | ||
var sass = require("sass"); | ||
var Fiber = require("fibers"); | ||
Sass's support for the legacy JavaScript API has the following limitations: | ||
sass.render({ | ||
file: "input.scss", | ||
importer: function(url, prev, done) { | ||
// ... | ||
}, | ||
fiber: Fiber | ||
}, function(err, result) { | ||
// ... | ||
}); | ||
``` | ||
* Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are | ||
supported. | ||
Both `render()` and `renderSync()` support the following options: | ||
* Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a | ||
sufficiently high precision for all existing browsers, and making this | ||
* [`data`](https://github.com/sass/node-sass#data) | ||
* [`file`](https://github.com/sass/node-sass#file) | ||
* [`functions`](https://github.com/sass/node-sass#functions--v300---experimental) | ||
* [`importer`](https://github.com/sass/node-sass#importer--v200---experimental) | ||
* [`includePaths`](https://github.com/sass/node-sass#includepaths) | ||
* [`indentType`](https://github.com/sass/node-sass#indenttype) | ||
* [`indentWidth`](https://github.com/sass/node-sass#indentwidth) | ||
* [`indentedSyntax`](https://github.com/sass/node-sass#indentedsyntax) | ||
* [`linefeed`](https://github.com/sass/node-sass#linefeed) | ||
* [`omitSourceMapUrl`](https://github.com/sass/node-sass#omitsourcemapurl) | ||
* [`outFile`](https://github.com/sass/node-sass#outfile) | ||
* [`sourceMapContents`](https://github.com/sass/node-sass#sourcemapcontents) | ||
* [`sourceMapEmbed`](https://github.com/sass/node-sass#sourcemapembed) | ||
* [`sourceMapRoot`](https://github.com/sass/node-sass#sourcemaproot) | ||
* [`sourceMap`](https://github.com/sass/node-sass#sourcemap) | ||
* Only the `"expanded"` and `"compressed"` values of | ||
[`outputStyle`](https://github.com/sass/node-sass#outputstyle) are supported. | ||
No support is intended for the following options: | ||
* [`precision`](https://github.com/sass/node-sass#precision). Dart Sass defaults | ||
to a sufficiently high precision for all existing browsers, and making this | ||
customizable would make the code substantially less efficient. | ||
* Dart Sass doesn't support the [`sourceComments`] option. Source maps are the | ||
recommended way of locating the origin of generated selectors. | ||
* [`sourceComments`](https://github.com/sass/node-sass#sourcecomments). Source | ||
maps are the recommended way of locating the origin of generated selectors. | ||
[`outputStyle`]: https://sass-lang.com/documentation/js-api/interfaces/LegacySharedOptions#outputStyle | ||
[`precision`]: https://github.com/sass/node-sass#precision | ||
[`sourceComments`]: https://github.com/sass/node-sass#sourcecomments | ||
## See Also | ||
@@ -86,0 +119,0 @@ |
18
sass.js
#!/usr/bin/env node | ||
// Copyright 2016 Google Inc. Use of this source code is governed by an | ||
// MIT-style license that can be found in the LICENSE file or at | ||
// https://opensource.org/licenses/MIT. | ||
require('./sass.dart.js'); | ||
var library = globalThis._cliPkgExports.pop(); | ||
if (globalThis._cliPkgExports.length === 0) delete globalThis._cliPkgExports; | ||
var index = require('./sass.dart.js'); | ||
library.load({ | ||
readline: require("readline"), | ||
chokidar: require("chokidar"), | ||
util: require("util"), | ||
stream: require("stream"), | ||
fs: require("fs"), | ||
immutable: require("immutable"), | ||
}); | ||
library.cli_pkg_main_0_(process.argv.slice(2)); | ||
index.run_(process.argv.slice(2)); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
1
56589
207
0
2339695
4
2
80
- Removedimmutable@^4.0.0
- Removedsource-map-js@>=0.6.2 <2.0.0
- Removedimmutable@4.3.7(transitive)
- Removedsource-map-js@1.2.1(transitive)
Updatedchokidar@>=2.0.0 <4.0.0