Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/darthmaim/gulp-to-ico

Gulp plugin to combine multiple .png files into a single .ico file.
https://github.com/darthmaim/gulp-to-ico

gulp gulp-plugin ico image

Last synced: 4 months ago
JSON representation

Gulp plugin to combine multiple .png files into a single .ico file.

Awesome Lists containing this project

README

        

![status](https://secure.travis-ci.org/darthmaim/gulp-to-ico.svg?branch=master)

Gulp wrapper for [to-ico](https://www.npmjs.com/package/to-ico).

## Installation

Install package with NPM and add it to your development dependencies:

`npm install --save-dev gulp-to-ico`

## Information

Packagegulp-to-ico

Description
Combine multiple .png files into a single .ico file.

Node Version
>= 4

## Usage

```js
var ico = require('gulp-to-ico');

gulp.task('favicon', function() {
return gulp.src('./img/favicon/*.png')
.pipe(ico('favicon.ico'))
.pipe(gulp.dest('./dist/'));
});
```

To specify `cwd`, `path` and other [vinyl](https://github.com/wearefractal/vinyl) properties, gulp-to-ico accepts `Object` as first argument:

```js
var ico = require('gulp-to-ico');

gulp.task('scripts', function() {
return gulp.src(['./img/favicon/16.png', './img/favicon/32.png'])
.pipe(ico({ path: 'favicon.ico', stat: { mode: 0666 }}))
.pipe(gulp.dest('./dist/'));
});
```

You can pass options to the underlying [to-ico](https://github.com/kevva/to-ico) plugin as a second parameter.

```js
var ico = require('gulp-to-ico');

gulp.task('favicon', function() {
return gulp.src('./img/favicon/*.png')
.pipe(ico('favicon.ico', { resize: true, sizes: [16, 24, 32, 64] }))
.pipe(gulp.dest('./dist/'));
});
```