
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
grunt-multiresize
Advanced tools
Export multiple sizes from an image
This plugin requires GraphicsMagick and Grunt ~0.4.1
First download and install GraphicsMagick. In Mac OS X, you can simply use Homebrew and do:
brew install graphicsmagick
If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:
npm install grunt-multiresize --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-multiresize');
In your project's Gruntfile, add a section named multiresize
to the data object passed into grunt.initConfig()
.
grunt.initConfig({
multiresize: {
target: {
src: 'path/to/source',
dest: ['path/to/dest1', '/path/to/dest2'],
destSizes: ['72x72', '114x114']
}
},
})
Type: String
The original file to be resized.
Type: String
or Array
The files to be written by this script.
Type: Array
The image dimensions expected. The format can be witdhxheight
or n%
.
Type: String
Background color, default transparent
. The format described here.
Type: String
Quality of output image, default 100
.
This project was originally created to resize our project icons to conform to CoronaSDK spec. This is our config file.
grunt.initConfig({
multiresize: {
iOS: {
src: 'orig/Icon-512.png',
dest: ['Icon.png', 'Icon@2x.png', 'Icon-72.png', 'Icon-72@2x.png'],
destSizes: ['57x57', '114x114', '72x72', '144x144']
},
Android: {
options: {
background: '#ffffff'
},
src: 'orig/Icon-Android-512.png',
dest: ['Icon-ldpi.png', 'Icon-mdpi.png', 'Icon-hdpi.png', 'Icon-xhdpi.png'],
destSizes: ['36x36', '48x48', '72x72', '96x96']
}
},
})
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
v0.1.0: Initial release
FAQs
Export multiple sizes from an image
The npm package grunt-multiresize receives a total of 0 weekly downloads. As such, grunt-multiresize popularity was classified as not popular.
We found that grunt-multiresize 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.