🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

sass

Package Overview
Dependencies
Maintainers
4
Versions
292
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass - npm Package Compare versions

Comparing version

to
1.62.1

sass.default.js

2

package.json

@@ -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":">=8.9.0"},"dependencies":{"chokidar":">=2.0.0 <4.0.0"},"keywords":["style","scss","sass","preprocessor","css"],"version":"1.26.3","bin":{"sass":"sass.js"},"main":"sass.dart.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":">=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","default":"./sass.default.js"},"version":"1.62.1","bin":{"sass":"sass.js"},"main":"sass.default.js"}

@@ -12,3 +12,3 @@ A pure JavaScript implementation of [Sass][sass]. **Sass makes CSS fun again**.

<td valign="middle">
<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>
<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>
<br>

@@ -29,3 +29,2 @@ <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)

@@ -44,75 +43,43 @@ * [Behavioral Differences from Ruby Sass](#behavioral-differences-from-ruby-sass)

```js
var sass = require('sass');
const sass = require('sass');
sass.render({file: scss_filename}, function(err, result) { /* ... */ });
const result = sass.compile(scssFilename);
// OR
var result = sass.renderSync({file: scss_filename});
// Note that `compileAsync()` is substantially slower than `compile()`.
const result = await sass.compileAsync(scssFilename);
```
[See below](#api) for details on Dart Sass's JavaScript API.
See [the Sass website][js api] for full API documentation.
## 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
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:
### Legacy API
[fibers]: https://www.npmjs.com/package/fibers
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.
```js
var sass = require("sass");
var Fiber = require("fibers");
[Node Sass]: https://github.com/sass/node-sass
[`render()`]: https://sass-lang.com/documentation/js-api/modules#render
[`renderSync()`]: https://sass-lang.com/documentation/js-api/modules#renderSync
sass.render({
file: "input.scss",
importer: function(url, prev, done) {
// ...
},
fiber: Fiber
}, function(err, result) {
// ...
});
```
Sass's support for the legacy JavaScript API has the following limitations:
Both `render()` and `renderSync()` support the following options:
* Only the `"expanded"` and `"compressed"` values of [`outputStyle`] are
supported.
* [`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.
* Dart Sass doesn't support the [`precision`] option. Dart Sass defaults to a
sufficiently high precision for all existing browsers, and making this
customizable would make the code substantially less efficient.
No support is intended for the following options:
* Dart Sass doesn't support the [`sourceComments`] option. Source maps are the
recommended way of locating the origin of generated selectors.
* [`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.
[`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
* [`sourceComments`](https://github.com/sass/node-sass#sourcecomments). Source
maps are the recommended way of locating the origin of generated selectors.
## See Also

@@ -119,0 +86,0 @@

#!/usr/bin/env node
var module = require('./sass.dart.js');
module.cli_pkg_main_0_(process.argv.slice(2));
var library = require('./sass.dart.js');
library.load({
readline: require("readline"),
chokidar: require("chokidar"),
util: require("util"),
immutable: require("immutable"),
fs: require("fs"),
});
library.cli_pkg_main_0_(process.argv.slice(2));

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display