Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gulp - The Streaming Build System

Gulp - The Streaming Build System

Talk about Gulp.js at Georgian Front-end Developers Meet-up #1. Let Gulp do everything for you.

Video on 17th slide: http://youtu.be/czAvYaPWBko

Levan Velijanashvili

April 19, 2015
Tweet

More Decks by Levan Velijanashvili

Other Decks in Technology

Transcript

  1. WHY BUILD SYSTEM Minify Mangle File concatenation Sprite generation Image

    optimization Live Server Testing (TTD) Deployment Fun!
  2. grunt.initConfig({ sass: { dist: { files: [{ cwd: 'styles', src:

    '**/*.scss', dest: '../.tmp/styles', expand: true, ext: '.css' }] } }, autoprefixer: { options: ['last 1 version'], dist: { files: [{ expand: true, cwd: '.tmp/styles', src: '{,*/}*.css', dest: 'dist/styles' }] } }, watch: { styles: { files: ['styles/{,*/}*.scss'], tasks: ['sass:dist', 'autoprefixer:dist'] } } }); grunt.registerTask('default', ['watch']); gulp.task('sass', function () { gulp.src('styles/**/*.scss') .pipe(sass()) .pipe(autoprefixer('last 1 version')) .pipe(gulp.dest('dist/styles')); }); gulp.task('default', function() { gulp.watch('styles/**/*.scss',function(){ gulp.run('sass'); }); }); CODE OVER CONFIG
  3. STREAM BASED a.styl b.styl c.styl minify auto prefix concat d.css

    How gulp works (and how we think it should)
  4. STREAM BASED a.styl b.styl c.styl minify auto prefix concat d.css

    How grunt works (not how we think it should) foo.tmp bar.tmp baz.tmp hei.tmp heu.tmp hoy.tmp Intensive I/O