Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
sass-vars-loader
Advanced tools
Convert a JavaScript object to Sass variables and prepend them to your Sass files. Useful for theming and sharing values between JavaScript and Sass for those who don't want to go all in on CSS in JS.
// You can require other modules but for hot-reloading to work they should be
// within the `context` dir
var aValue = require('./other-module');
module.exports = {
a: {
b: '100px',
c: {
d: 99,
e: true,
f: aValue
}
},
// URLs to assets should be relative to your Webpack `resolve.root`
// so they can be `required` from any JS or Sass module
logo: 'themes/id/logo.svg'
};
Will be converted to:
$a-b: 100px;
$a-c-d: 99;
$a-c-e: true;
$a-c-f: 1em; // From other-module';
$logo: "themes/id/logo.svg";
Values containing /
are wrapped with quotes, otherwise they become Sass values.
'style-loader!css-loader!autoprefixer-loader!sass-loader?indentedSyntax=sass!sass-imports?context=' + path.resolve(__dirname, 'themes') + '&file=id/vars.js'
context
- Absolute path to a folder. Changes to assets in this folder trigger rebuildsfile
- Path to module that exports vars object. Absolute or relative to context
files[]
- Array of file
sFAQs
Webpack loader to import JavaScript object as Sass variables
The npm package sass-vars-loader receives a total of 1 weekly downloads. As such, sass-vars-loader popularity was classified as not popular.
We found that sass-vars-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.