Node's Perpetuum Mobile

    gulp-to-ico

    1.0.0 • Public • Published

    status

    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

    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 properties, gulp-to-ico accepts Object as first argument:

    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 plugin as a second parameter.

    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/'));
    });

    Install

    npm i gulp-to-ico

    DownloadsWeekly Downloads

    61

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • darthmaim