Registry / devops / broccoli-sass2scss

broccoli-sass2scss

JSON →
library0.1.3jsnpmunverified

A Broccoli plugin that compiles Sass/SCSS files into CSS using libsass. The current version (0.1.3) is stable but relies on an outdated Node.js addon build process (node-gyp) and libsass, which is deprecated in favor of Dart Sass. Key differentiators: integrates with the Broccoli asset pipeline, supporting multiple input trees and source maps. However, due to libsass deprecation and potential native module issues, it is recommended to use alternative plugins like 'broccoli-sass' or 'broccoli-sass-source-maps' that leverage Dart Sass or newer bindings.

npm install broccoli-sass2scss
INSTALL
IMPORT
SIG · BROCCOLI-SASS2SCSS
B
broccoli-sass2scss
devopsjavascriptv0.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

compileSass
const compileSass = require('broccoli-sass');
import compileSass from 'broccoli-sass';
This package is CJS-only. ESM import will fail.
compileSass
var compileSass = require('broccoli-sass');
const compileSass = require('broccoli-sass2scss');
Package name is 'broccoli-sass', not 'broccoli-sass2scss'.
compileSass
const compileSass = require('broccoli-sass');
var compileSass = require('broccoli-sass').default;
No default export. Use module.exports directly.

Basic usage of broccoli-sass: compiles app/styles/app.scss to app.css with compact output style.

const compileSass = require('broccoli-sass'); const { WatchedDir } = require('broccoli-source'); const sourceTrees = [new WatchedDir('app/styles')]; const inputFile = 'app.scss'; const outputFile = 'app.css'; const options = { outputStyle: 'compact' }; const outputTree = compileSass(sourceTrees, inputFile, outputFile, options); module.exports = outputTree;
Debug
Known issues
deprecatedlibsass is deprecated; Dart Sass is the recommended alternative.
fix
Switch to a broccoli plugin that uses Dart Sass, e.g., 'broccoli-sass-source-maps' or use sass package directly.
affects: >=0.0.0
gotchaPackage name mismatch: 'broccoli-sass2scss' does not exist; the correct package is 'broccoli-sass'.
fix
Install 'broccoli-sass' instead of 'broccoli-sass2scss'.
affects: >=0.0.0
gotchaRequires node-gyp to compile native libsass bindings; may fail on some systems.
fix
Ensure build tools are installed (python, C++ compiler) or switch to a pure-JS alternative.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'broccoli-sass2scss'
Incorrect package name; 'broccoli-sass2scss' is not published.
fix
npm install --save-dev broccoli-sass
Error: Module build failed: Error: Cannot find module 'node-sass'
Missing libsass binding; this plugin depends on node-sass which may not be installed.
fix
npm install --save-dev node-sass
Error: The libsass native extension is not available. Try reinstalling node-sass.
node-gyp failed to compile native module.
fix
Reinstall build tools: `npm install -g node-gyp` then `npm rebuild node-sass`
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies
broccoli-sassrequiredTypo: 'broccoli-sass2scss' is the same as 'broccoli-sass' package, but the npm metadata is misleading. The actual plugin is broccoli-sass.
Agent activity
5 hits · last 30 days
node
4
Resources
broccoli-sass2scss — npm install broccoli-sass2scss · libregistry