Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Gulp.js
Search
Samuel Flores
August 09, 2014
Technology
1
150
Gulp.js
Automatizando o build do front end das suas apps, de maneira rápida e fácil.
Samuel Flores
August 09, 2014
Tweet
Share
More Decks by Samuel Flores
See All by Samuel Flores
Clojure
samflores
4
200
Introdução ao MRuby
samflores
1
56
Por que Ruby?
samflores
1
140
Extendendo Ruby com C (& cartoons)
samflores
3
180
Sinatra
samflores
2
220
Other Decks in Technology
See All in Technology
自律的なスケーリング手法FASTにおけるVPoEとしてのアカウンタビリティ / dev-productivity-con-2025
yoshikiiida
2
17k
Reach American Airlines®️ Instantly: 19 Calling Methods for Fast Support in the USA
flyamerican
1
180
MobileActOsaka_250704.pdf
akaitadaaki
0
160
Getting to Know Your Legacy (System) with AI-Driven Software Archeology (WeAreDevelopers World Congress 2025)
feststelltaste
1
160
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
54
21k
United airlines®️ USA Contact Numbers: Complete 2025 Support Guide
unitedflyhelp
0
330
AI エージェントと考え直すデータ基盤
na0
15
4.7k
20250707-AI活用の個人差を埋めるチームづくり
shnjtk
6
4k
Delta airlines®️ USA Contact Numbers: Complete 2025 Support Guide
airtravelguide
0
340
タイミーのデータモデリング事例と今後のチャレンジ
ttccddtoki
6
2.5k
インフラ寄りSREの生存戦略
sansantech
PRO
6
2k
OpenTelemetryセマンティック規約の恩恵とMackerel APMにおける活用例 / SRE NEXT 2025
mackerelio
2
580
Featured
See All Featured
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
107
19k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
How STYLIGHT went responsive
nonsquared
100
5.6k
Code Review Best Practice
trishagee
69
19k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.7k
Unsuck your backbone
ammeep
671
58k
A better future with KSS
kneath
238
17k
Building Applications with DynamoDB
mza
95
6.5k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
The Language of Interfaces
destraynor
158
25k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Transcript
@samflores
None
Twitter Bootstrap Slider Parallax jQuery Backbone
1 .css & 1 .js 1 .css & 1 .js
1 .js 1 .js 2 .js Twitter Bootstrap Slider Parallax jQuery Backbone
None
None
None
None
None
None
None
None
<html> <head> <link rel="stylesheet" href="css/bootstrap.css"> <link rel="stylesheet" href="css/slider.css"> <link rel="stylesheet"
href="css/custom.css"> </head> <body> ... <script src="js/jquery.js"></script> <script src="js/jquery.parallax.js"></script> <script src="js/jquery.slider.js"></script> <script src="js/bootstrap.js"></script> <script src="js/underscore.js"></script> <script src="js/backbone.js"></script> <script src="js/application.js"></script> </body> </html>
seriously?
! No braço!
seriously?
None
GRUNT The JavaScript Task Runner
module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), concat: {
options: { separator: ';' }, dist: { src: ['src/**/*.js'], dest: 'dist/<%= pkg.name %>.js' } }, uglify: { options: { banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' }, dist: { files: { 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] } } }, qunit: { files: ['test/**/*.html'] }, jshint: { files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], options: { // options here to override JSHint defaults globals: { Gruntfile.js
files: ['test/**/*.html'] }, jshint: { files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'], options:
{ // options here to override JSHint defaults globals: { jQuery: true, console: true, module: true, document: true } } }, watch: { files: ['<%= jshint.files %>'], tasks: ['jshint', 'qunit'] } }); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-concat'); grunt.registerTask('test', ['jshint', 'qunit']); grunt.registerTask('default', ['jshint', 'qunit', 'concat', 'uglify']); }; Gruntfile.js
seriously?
gulp.js The streaming build system
Streams Modular API Simples Rápido
Streams Unix pipes no Node.js
Streams Unix pipes no Node.js Facilita composição e reuso
Streams Unix pipes no Node.js Facilita composição e reuso Assíncrono
sem callback hell
Streams Unix pipes no Node.js Facilita composição e reuso Assíncrono
sem callback hell stream1.pipe(stream2)
Modular Pequenos plugins
Modular Pequenos plugins "do one thing and do it well"
Modular Pequenos plugins "do one thing and do it well"
Orientações rígidas
Modular Pequenos plugins "do one thing and do it well"
Orientações rígidas require('gulp-module')
API Simple gulp.task(…)
API Simple gulp.task(…) gulp.src(…)
API Simple gulp.task(…) gulp.src(…) gulp.dest(…)
API Simple gulp.task(…) gulp.src(…) gulp.dest(…) gulp.watch(…)
Rápido Perfeito para "watch"
Rápido Perfeito para "watch" Assíncrono FTW"
Rápido Perfeito para "watch" Assíncrono FTW" Assíncrono WTF#
Live Coding (hopefully)
Thanks! @samflores