SlideShare a Scribd company logo
Introduction to
Gulp
Arga Padan
David Hutagalung
What’s
Gulp
• Front-end
development tool
• Task automation in
JavaScript
• Streaming build
system
Why
Gulp
• Demand on
large projects
• Repetitive,
tedious tasks
• Saving time
Getting
started
More
technically..
❶ from command line…
$ npm install -g gulp
(install Gulp globally)
❷ create
gulpfile.js & package.json
(on your project folder.
See at slide 13-15 for
more details)
❸ from command line..
$ npm install [plugin_name]
--save (project folder)
More technically..
(cont.)
gulpfile.js
Tells Gulp for every tasks,
what those tasks are,
when to run them.
package.json
List of installed plugins
Create both of them at root
directory
API • task
• src
• pipe
• dest
• watch
API
task
defining a task
gulp.task(name[, deps], fn)
name → task name
deps → arrays of tasks
(deps isn’t mandatory)
fn → performs task
operation
API
src
Takes a glob & represents a file
structure
gulp.src(globs)
globs → file path
API
pipe
for data streaming
(output from prev. process become
input for the next process)
Makes Gulp different compared to
Grunt
.pipe([data_stream])
data_stream → task or file
destination
API
dest
Write files into desired directory
gulp.dest(path)
path → file directory for written
files
API
watch
Watch files and do something
when a file changes
• gulp.watch(glob, fn)
glob → file(s) to watch for changes.
fn → defined function
(added with gulp.task())
gulpfile.js
var [variable_name] = require(‘[plugin_name]');
⋮
gulp.task(‘[task_name]’, function () {
return gulp
.src(‘[file_name]’)
.pipe( [variable_name]() ) ;
⋮
});
gulpfile.js (continued)
gulp.task('watch', function () {
gulp.watch(‘[file_name]', [‘task_name']);
});
package.json
{
"name": “[package_name]",
"dependencies": {
"gulp": "^3.8.5",
"gulp-clean": "^0.3.1",
⋮
}
}
Common
Tasks
• SASS Compile
(gulp-ruby-sass)
• Minify code
.css (gulp-minify-css)
.js & .html (gulp-uglify)
• Watch
(gulp-watch)
vs
GruntGulp
Similarity
• JavaScript-based
task runner
• Running on Node.js
Difference
Build system
workflow
Gulp
Input Read Files
Write Files
Modify Files
Output
Modify Files
Modify Files
Grunt
Input Read Files
Temp folder
Write Files
Read Files
Temp folder
Write Files
Read Files Write Files
Output
Modify Files
Modify Files
Modify Files
Building Responsivity
Uses streams from Node.js,
No any stream use,
some files are stored temporarily
So Gulp builds faster than Grunt!
Configuration & Code
Plugins
Gulp : 432 plugins
Grunt : 2,580 plugins
(as of March 2014)
http://www.oomphinc.com/blog/2014-
03/gulp-vs-grunt-node-js-automation-tools-
showdown/
Example : Compile LESS (Gulp)
Compile LESS (Grunt)
Source
• http://markgoodyear.com/2014/01/getting-started-
with-gulp/
• https://github.com/gulpjs/gulp/blob/master/docs/ge
tting-started.md
• https://www.npmjs.org/
• http://gulpjs.com/
• http://www.oomphinc.com/blog/2014-03/gulp-vs-
grunt-node-js-automation-tools-showdown/
Source
• http://jaysoo.ca/2014/01/27/gruntjs-vs-gulpjs/
• http://blog.ponyfoo.com/2014/07/04/choose-
grunt-gulp-or-npm
• blog.evanyou.me/2013/12/29/gulp-piping/
• http://slides.com/contra/gulp#/

More Related Content

PDF
Improving your workflow with gulp
frontendne
 
PDF
Intro to Gulp
Matt Brunt
 
PDF
Gulp: Your Build Process Will Thank You
RadWorks
 
PDF
Gulp - the streaming build system
Sergey Romaneko
 
ODP
GulpJs - An Introduction
Knoldus Inc.
 
PPTX
Automated Development Workflow with Gulp
plewicki
 
PPTX
JavaScript code academy - introduction
Jaroslav Kubíček
 
PDF
Angular workflow with gulp.js
Cihad Horuzoğlu
 
Improving your workflow with gulp
frontendne
 
Intro to Gulp
Matt Brunt
 
Gulp: Your Build Process Will Thank You
RadWorks
 
Gulp - the streaming build system
Sergey Romaneko
 
GulpJs - An Introduction
Knoldus Inc.
 
Automated Development Workflow with Gulp
plewicki
 
JavaScript code academy - introduction
Jaroslav Kubíček
 
Angular workflow with gulp.js
Cihad Horuzoğlu
 

What's hot (20)

PPTX
Gulp: Task Runner
Christopher Bautista
 
PDF
Gulp - The Streaming Build System
TO THE NEW | Technology
 
PPTX
JavaScript Task Runners - Gulp & Grunt
Lohith Goudagere Nagaraj
 
PDF
Devenez le plus heureux des Front-end avec Gulp.js
Rémy Savard
 
PDF
Frontend JS workflow - Gulp 4 and the like
Damien Seguin
 
PDF
Automating your workflow with Gulp.js
Bo-Yi Wu
 
PDF
Getting started with gulpjs
unmesh dusane
 
PDF
Automating Large Applications on Modular and Structured Form with Gulp
Anderson Aguiar
 
ODP
Introduction to GulpJs
Harish Gadiya
 
PPTX
Gulp and bower Implementation
Prashant Shrestha
 
PDF
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
KAI CHU CHUNG
 
PDF
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
tdc-globalcode
 
PDF
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
PDF
Web development tools { starter pack }
François Michaudon
 
PDF
Screenshot as a service
KAI CHU CHUNG
 
PDF
Production Ready Javascript With Grunt
XB Software, Ltd.
 
PPTX
Go to gRPC
Naren Arya
 
PDF
Develop - Project Scaffolding
Kevin Cao
 
PPTX
Introduction to using Grunt & Bower with WordPress theme development
James Bundey
 
Gulp: Task Runner
Christopher Bautista
 
Gulp - The Streaming Build System
TO THE NEW | Technology
 
JavaScript Task Runners - Gulp & Grunt
Lohith Goudagere Nagaraj
 
Devenez le plus heureux des Front-end avec Gulp.js
Rémy Savard
 
Frontend JS workflow - Gulp 4 and the like
Damien Seguin
 
Automating your workflow with Gulp.js
Bo-Yi Wu
 
Getting started with gulpjs
unmesh dusane
 
Automating Large Applications on Modular and Structured Form with Gulp
Anderson Aguiar
 
Introduction to GulpJs
Harish Gadiya
 
Gulp and bower Implementation
Prashant Shrestha
 
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
KAI CHU CHUNG
 
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
tdc-globalcode
 
The Secrets of The FullStack Ninja - Part A - Session I
Oded Sagir
 
Web development tools { starter pack }
François Michaudon
 
Screenshot as a service
KAI CHU CHUNG
 
Production Ready Javascript With Grunt
XB Software, Ltd.
 
Go to gRPC
Naren Arya
 
Develop - Project Scaffolding
Kevin Cao
 
Introduction to using Grunt & Bower with WordPress theme development
James Bundey
 
Ad

Viewers also liked (8)

PPTX
Vamos automatizar! Conheça o Gulp Js
Yan Magalhães
 
PPTX
Grunt and Bower
George Estebe
 
PDF
gulp-techdencias
Dany Sebastian Paredes
 
PPTX
Bower introduction
Oleksii Prohonnyi
 
PDF
Automatización de tareas con Gulp
Álvaro Navarro Iborra
 
PPTX
Sprite ppt
Suma Lima
 
PDF
Docker 101: Introduction to Docker
Docker, Inc.
 
PPTX
40+ tips to use Postman more efficiently
postmanclient
 
Vamos automatizar! Conheça o Gulp Js
Yan Magalhães
 
Grunt and Bower
George Estebe
 
gulp-techdencias
Dany Sebastian Paredes
 
Bower introduction
Oleksii Prohonnyi
 
Automatización de tareas con Gulp
Álvaro Navarro Iborra
 
Sprite ppt
Suma Lima
 
Docker 101: Introduction to Docker
Docker, Inc.
 
40+ tips to use Postman more efficiently
postmanclient
 
Ad

Similar to Introduction to Gulp (20)

PPTX
Automating WordPress Plugin Development with Gulp
Mike Hale
 
PDF
Plumbin Pipelines - A Gulp.js workshop
Stefan Baumgartner
 
PDF
JLPDevs - Optimization Tooling for Modern Web App Development
JLP Community
 
PPTX
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
Alexander Dean
 
PPTX
Toolbox of a Ruby Team
Arto Artnik
 
PDF
#OktoCampus - Workshop : An introduction to Ansible
Cédric Delgehier
 
PPTX
Getting Started with Gulp
Jure Šuvak
 
PDF
Gradleintroduction 111010130329-phpapp01
Tino Isnich
 
PDF
Gradle Introduction
Dmitry Buzdin
 
PPTX
"Modern DevOps & Real Life Applications. 3.0.0-devops+20230318", Igor Fesenko
Fwdays
 
PDF
Apache Airflow® Best Practices: DAG Writing
Aggregage
 
PDF
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
Омские ИТ-субботники
 
ODP
Gradle: The Build System you have been waiting for!
Corneil du Plessis
 
PDF
10 Cool Facts about Gradle
Evgeny Goldin
 
PDF
The Fairy Tale of the One Command Build Script
Docker, Inc.
 
PDF
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Diego Freniche Brito
 
PDF
Workflow automation for Front-end web applications
Mayank Patel
 
PDF
Grunt All Day
douglasknudsen
 
Automating WordPress Plugin Development with Gulp
Mike Hale
 
Plumbin Pipelines - A Gulp.js workshop
Stefan Baumgartner
 
JLPDevs - Optimization Tooling for Modern Web App Development
JLP Community
 
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
Alexander Dean
 
Toolbox of a Ruby Team
Arto Artnik
 
#OktoCampus - Workshop : An introduction to Ansible
Cédric Delgehier
 
Getting Started with Gulp
Jure Šuvak
 
Gradleintroduction 111010130329-phpapp01
Tino Isnich
 
Gradle Introduction
Dmitry Buzdin
 
"Modern DevOps & Real Life Applications. 3.0.0-devops+20230318", Igor Fesenko
Fwdays
 
Apache Airflow® Best Practices: DAG Writing
Aggregage
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
Омские ИТ-субботники
 
Gradle: The Build System you have been waiting for!
Corneil du Plessis
 
10 Cool Facts about Gradle
Evgeny Goldin
 
The Fairy Tale of the One Command Build Script
Docker, Inc.
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Diego Freniche Brito
 
Workflow automation for Front-end web applications
Mayank Patel
 
Grunt All Day
douglasknudsen
 

Recently uploaded (20)

PDF
Doc9.....................................
SofiaCollazos
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Doc9.....................................
SofiaCollazos
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
The Future of Artificial Intelligence (AI)
Mukul
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Get More from Fiori Automation - What’s New, What Works, and What’s Next.pdf
Precisely
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Data_Analytics_vs_Data_Science_vs_BI_by_CA_Suvidha_Chaplot.pdf
CA Suvidha Chaplot
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 

Introduction to Gulp

Editor's Notes

  • #16: Package.json harus ditaruh di dalam direktori yang sama dengan file .js