New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-montage

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-montage - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

package.json
{
"name": "grunt-montage",
"description": "Generate CSS sprite sheets and the corresponding stylesheet",
"version": "0.0.3",
"version": "0.0.4",
"author": {

@@ -6,0 +6,0 @@ "name": "James Allardice",

@@ -61,2 +61,8 @@ # montage

#### options.magick
Type: `Object`
Default value: `undefined`
A map of [command-line options for the ImageMagick montage tool](http://www.imagemagick.org/script/montage.php).
### Usage Examples

@@ -103,3 +109,27 @@

In this example, custom options are used to pass extra configuration through to ImageMagick. It will generate the same sprite sheet as the previous example, but with a transparent background.
```js
grunt.initConfig({
montage: {
simple: {
files: {
"assets/sprites": [
"images/icons/*.png"
]
},
options: {
size: 32,
outputImage: "sprites.png",
outputStylesheet: "styles.css",
magick: {
background: "none"
}
}
}
}
});
```
## Contributing
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](http://gruntjs.com/).

@@ -18,4 +18,13 @@ module.exports = function (grunt) {

outputImage = options.outputImage || "montage.png",
outputStylesheet = options.outputStylesheet || "montage.css";
outputStylesheet = options.outputStylesheet || "montage.css",
cliOptions = "";
// Build ImageMagick montage option string
options.magick = options.magick || {};
cliOptions = Object.keys(options.magick).map(function (option) {
return "-" + option + " " + options.magick[option];
}).join(" ");
console.log(cliOptions);
// Iterate over all specified file groups.

@@ -63,3 +72,3 @@ this.files.forEach(function (files) {

// Execute the ImageMagick montage tool
exec("montage -tile " + cols + "x -geometry " + size + "x" + size + " " + src.join(" ") + " " + dest, function (err) {
exec("montage -tile " + cols + "x -geometry " + size + "x" + size + " " + cliOptions + " " + src.join(" ") + " " + dest, function (err) {
done();

@@ -66,0 +75,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc