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-image-compiler
Advanced tools
Compress images to Base64 Data URIs in variables and output to SCSS file
This is a broccoli library for processing image files and creating SASS variables with Data URIs in them.
In your Brocfile.js
:
var sassImageCompiler = require('broccoli-sass-image-compiler');
var imageTree = sassImageCompiler('/some_dir', {
inputFiles: [
'**/*.png', // all png files
'someFile.svg' // specific svg file
],
// specify the output file you want created
outputFile: '/compiled-images.scss',
// whether or not to output an icon class
// defaults to true
icon: true,
// whether or not to output width and height variables, required for icon class.
// defaults to true
size: true,
// name for parent class of icon class output (i.e "icon" in `.icon.image_name`)
// defaults to "icon"
iconClass: 'icon'
});
Then in your SASS
@import 'path/to/compiled-images';
.custom-class {
background-image: url($someFile); // derived from 'someFile.svg'
}
.other-class {
background-image: url($icon_16x16); // if you had a file named "whatever/icon_16x16.png"
}
Output from this tool includes:
$filename
: the data URI variable with the base64 encoded image in it.$filename_width
: the width of the image$filename_height
: the height of the image.icon.filename
: classes that, when applied can be used as an icon for the image file. <div class="icon filename"></div>
0.1.4
FAQs
Compress images to Base64 Data URIs in variables and output to SCSS file
The npm package broccoli-sass-image-compiler receives a total of 1 weekly downloads. As such, broccoli-sass-image-compiler popularity was classified as not popular.
We found that broccoli-sass-image-compiler 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’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.