
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
scss-splinter
Advanced tools
scss-splinter enables the creation of multiple stylesheets from a common set of modules with minimal effort via SCSS mixins and functions.
scss-splinter accepts an options object that specifies a partial
, a base
, and a optional keyword
to grep for.
const parse = require('scss-splinter');
parse({
partial: 'src/scss/_brands.scss',
base: 'src/scss/_base.scss',
keyword: 'split',
})
Partial is the name of the file that scss-splinter will generate with "split" code, e.g. code that is specified in the matching mixin or sass-function.
Base is the name of the main sass
index file in a project. This is the file scss-splinter will use to find all the files it needs to parse.
scss-splinter fills the partial
file with "split" scss
and returns a promise that contains "global" scss
. It's up to the project to determine what to do with this global string. One approach would be to run the string through node-sass
and write the compiled css
to a file.
const fs = require('fs');
const parse = require('scss-splinter');
const nodeSass = require('node-sass');
parse({
partial: 'src/scss/_brands.scss',
base: 'src/scss/_base.scss',
keyword: 'split',
})
.then((scss) => {
const compiledGlobal = nodeSass.renderSync({
data: scss,
});
fs.writeFileSync('global.css', compiledGlobal.css.toString());
});
If your SCSS
files are not located at src/scss
, you can pass cwd
in the params:
const parse = require('scss-splinter');
parse({
partial: '_brands.scss',
base: '_base.scss',
keyword: 'split',
cwd: 'i/keep/my/scss/files/here',
})
FAQs
Parse and split SCSS files based on functions and mixins.
The npm package scss-splinter receives a total of 0 weekly downloads. As such, scss-splinter popularity was classified as not popular.
We found that scss-splinter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.