Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
broccoli-sass-source-maps
Advanced tools
The broccoli-sass plugin compiles .scss
and .sass
files with
Dart Sass or LibSass.
This is a fork of broccoli-sass that includes support for more options and provides (partial)
support for source maps by embedding the content of the SASS source files in the source map using sourcesContent
.
Be aware that the paths in the generated source map not correct, but this module does what I need until the underlying issue is resolved.
npm install --save-dev broccoli-sass-source-maps sass
var compileSass = require('broccoli-sass-source-maps')(require('sass'));
var outputTree = compileSass(inputTrees, inputFile, outputFile, options);
Note that when using Dart Sass, synchronous compilation is twice as fast as
asynchronous compilation by default, due to the overhead of asynchronous
callbacks. To avoid this overhead, you can use the fibers
package to call
asynchronous importers from the synchronous code path. To enable this, pass the
Fiber
class to the fiber
option:
var compileSass = require('broccoli-sass-source-maps')(require('sass'));
var Fiber = require('fibers');
var outputTree = compileSass(inputTrees, inputFile, outputFile, {fiber: Fiber});
inputTrees
: An array of trees that act as the include paths for
Sass. If you have a single tree, pass [tree]
.
inputFile
: Relative path of the main .scss
or .sass
file to compile.
Broccoli-sass expects to find this file in the first input tree
(inputTrees[0]
).
outputFile
: Relative path of the output CSS file.
options
: An optional hash of options for libsass and caching writer.
functions
, indentedSyntax
, omitSourceMapUrl
, outputStyle
, precision
, quietDeps
(Dart Sass only), silenceDeprecations
(Dart Sass only)
sourceComments
, sourceMap
, sourceMapEmbed
, and sourceMapContents
.annotation
, cacheInclude
, and cacheExclude
(see details here).var appCss = compileSass(['styles', 'vendor'], 'myapp/app.scss', 'assets/app.css');
You must specify which version of Dart Sass or [Node Sass][] to use by
passing it as a parameter to the module. Add either sass
(for Dart Sass) or
node-sass
to your package.json and then provide that version as a parameter
to the module:
// Uses Dart Sass.
var compileSass = require('broccoli-sass-source-maps')(require('sass'));
// Uses Node Sass.
var compileSass = require('broccoli-sass-source-maps')(require('node-sass'));
v4.3.0 (2024-08-07)
FAQs
Libsass-based Sass compiler for Broccoli
The npm package broccoli-sass-source-maps receives a total of 51,690 weekly downloads. As such, broccoli-sass-source-maps popularity was classified as popular.
We found that broccoli-sass-source-maps demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.