Building a better process

with

Gulp

sthlm.js
April 23, 2014

Gulp is three things

Streams

Vinyl

Orchestrator

Streams

Vinyl:

File meta data

Path & Content

Orchestrator:

A way to define and run tasks

Gulp:

Fast

Code over configuration

What are we trying to achieve?

Immediate feedback

"Creation is about discovery"

- Bret Victor

Dual screens - code and output

Live reload


	gulp.task "_reveal_include", ->
		gulp.src "src/slides/**/*.html"
			.pipe includer()
			.pipe gulp.dest 'app/'
			.pipe livereload()
		return

	gulp.task '_reveal', ->
		gulp.watch "src/slides/**/*.*", ['_reveal_include']
	

	gulp.task "_dist-styles", ->
		gulp.src file
			.pipe sass
				includePaths: includePaths
				outputStyle: "compressed"
				sourceComments: "normal"
				file: file
			.on "error", logExit
			.pipe prefix "last 2 versions", "ie 10", "Android 4"
			.pipe csso()
			.pipe gulp.dest target + "css/"
	

DEMO!

Verdict

Benefits

+ SPEED

+ Code > config

Concerns

- Maturity

- Small ecosystem

The future process

THE

code-compile-run

LOOP

abc

*
abc

abc

*
abc

Questions?