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.
gulp-query-compress
Advanced tools
Plugin for gulp-query
Compress your images in other directory
Uses imagemin, pngquant for PNG and pngquant for JPEG
This plugin provides automatic compress and copy.
npm install gulp-query gulp-query-compress
Paste the code into your gulpfile.js
and configure it
let build = require('gulp-query')
, compress = require('gulp-query-compress')
;
build((query) => {
query.plugins([compress])
// simple
.compress('src/icons/*.png','images/')
// multi
.compress([
'src/icons/*.png',
{from:'src/bg/*',to: 'bg/'},
{from:'src/bg2/*',to: 'bg2/'}
], 'images/','admin')
// multi and config
.compress([
'src/icons/*.png',
{from:'src/bg/*',to: 'bg/'},
{from:'src/bg2/*',to: 'bg2/'}
], 'images/',{
png: {
quality: '60-70',
speed: 1
}
})
// object
.compress({
name: 'any',
from: ['src/images/*.jpg'],
to: 'images/',
png: {
quality: '60-70',
speed: 1
},
jpeg: {
quality: 60,
}
})
;
});
And feel the freedom
gulp
gulp --production // For production (minification)
gulp watch // Watching change
gulp compress // Only for compress
gulp compress:admin // Only for task with name admin
...
.compress({
name: "task_name", // For gulp js:task_name
from: 'src/images/*.jpg', // ["src/images/*.jpg", "src/images2/*.jpg"]
to: "images/",
png: {
quality: '60-70',
speed: 1
},
jpeg: {
quality: 60,
}
})
FAQs
This plugin provides automatic compress and copy.
The npm package gulp-query-compress receives a total of 0 weekly downloads. As such, gulp-query-compress popularity was classified as not popular.
We found that gulp-query-compress 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.