Skip to content

Instantly share code, notes, and snippets.

@mitsuruog
Created December 23, 2015 14:40
Show Gist options
  • Select an option

  • Save mitsuruog/eddfcb0081d63154f342 to your computer and use it in GitHub Desktop.

Select an option

Save mitsuruog/eddfcb0081d63154f342 to your computer and use it in GitHub Desktop.

Revisions

  1. mitsuruog created this gist Dec 23, 2015.
    35 changes: 35 additions & 0 deletions gulpfile.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    const gulp = require('gulp');
    const imageResize = require('gulp-image-resize');
    const remoteSrc = require('gulp-remote-src');

    const bootstrapThemes = [
    'Cerulean',
    'Cosmo',
    'Cyborg',
    'Darkly',
    'Flatly',
    'Journal',
    'Lumen',
    'Paper',
    'Readable',
    'Sandstone',
    'Simplex',
    'Slate',
    'Spacelab',
    'Superhero',
    'United',
    'Yeti'
    ].map((theme) => theme.toLowerCase());

    gulp.task('bootswatch', () => {
    bootstrapThemes.map((theme) => {
    remoteSrc(['thumbnail.png'], {
    base: `https://bootswatch.com/${theme}/`
    })
    .pipe(imageResize({
    width: 350
    }))
    .pipe(rename(`${theme}.png`))
    .pipe(gulp.dest('thumbnails'))
    });
    });