SlideShare une entreprise Scribd logo
1  sur  32
Gulp : Task Runner
For Node Fundamentals @ BCIT
What is
Gulp?
End
Uses
Install
Plugins
Features
Linting
Preprocessing
Asset OptimizationPrepare
Distribution
Templating
Project
Interpolation
Minify JS/CSS
? ?
?
?
?
LESS/SASS
Unit Tests
Coffeescript
What is Gulp?
● Build
system/Automation
● Built in Javascript
● Streams
● Plugins
http://gulpjs.com
What is
Gulp?
End
Uses
Install
Plugins
Features
What it’s good for?
● Combine/Concatenate
● Preprocessing SASS/LESS
Coffeescript etc.
● Optimizing assets
● Tests
● Code changes triggered tasks
● others via plugins
What is
Gulp?
End
Uses
Install
Plugins
Features
---- install
> npm install -g gulp
> npm init
> npm install gulp --save-dev
----- configure
> nano gulpfile.js
----- run
> gulp
What is
Gulp?
End
Uses
Install
Plugins
Features
Tasks
gulp.task('js', function () {
...
});
gulp.task('css', function () {
...
});
gulp.task('server', function () {
...
pipe(livereload());//browser reload
});
gulp.task('default', function () {
Source and
Destination
webapp/
├── build
│ ├── images
│ ├── css
│ └── js
│ └── vendor
├── node_modules
│ ├── gulp
│ ├── gulp-concat
│ ├── gulp-html-replace
│ ├── gulp-notify
│ ├── gulp-uglify
│ └── gulp-uglifycss
├── src
│ ├── images
│ ├── css
│ └── js
│ └── vendor
├── package.json
// process js files save to build/js
gulp.task('js', function () {
return gulp.src('src/js/*.js')
.pipe(gulp.dest('build/js'));
});
Streams and
Pipe
gulp.task('js', function () {
return gulp.src('js/*.js')
.pipe(jshint())
.pipe(jshint.reporter('default'))
.pipe(uglify())
.pipe(concat('app.js'))
.pipe(gulp.dest('build'));
});
Watch
gulp.task('setupJSWatch', function () {
gulp.watch('js/*.js', ['build']);
});
gulp.task('build', function () {
...
});
What is
Gulp?
End
Uses
Install
Plugins
Features
----- add plugins
> npm install gulp-[plugin] --save-dev
...
"devDependencies": { "gulp-concat": "^2.3.3",
"gulp-jshint": "^1.7.1",
"gulp-rename": "^1.2.0",
"gulp-sass": "^0.7.2",
"gulp-uglify": "^0.3.1" }
> npm install --save-dev gulp-concat
concat
var concat = require(‘gulp-concat’);
gulp.task('js', function () {
return gulp.src('js/*.js')
.pipe(concat('app.js'));
.pipe(gulp.dest('build'));
});
> npm install --save-dev gulp-uglify
uglify
var concat = require(‘gulp-uglify’);
gulp.task('js', function () {
return gulp.src('js/*.js')
.pipe(concat('app.js'));
.pipe(uglify());
.pipe(gulp.dest('build'));
});
> npm install --save-dev browser-sync
browsersync
var browserSync= require(‘browser-sync’);
gulp.task('js-watch', ['js'],browserSync.reload);
gulp.task('serve', ['js'], function () {
browserSync({
server: {
baseDir: "./src/"
},
port: 8080
});
// add browserSync.reload to the tasks array to make
// all browsers reload after tasks are complete.
gulp.watch("js/*.js", ['js-watch']);
});
imagemin
gulp-coffee/sass/less
livereload
gulp-util
compress/decompress
gulp-baseimg
other plugins
http://gulpjs.com/plugins/
What is
Gulp?
Wrap up
Uses
Install
Plugins
Features
● Gulp is a build system to automate
tedious, repetitive but very important
tasks
● Tasks/Streams
● Learn to use gulp.task, gulp.src,
gulp.dest and gulp.watch
● Explore plugins
Wrap up
http://gulpjs.com
● References
○ http://gulpjs.com
○ http://www.smashingmagazine.com/2014/06/11/bui
lding-with-gulp/
○ http://www.browsersync.io/docs/gulp/
○ https://www.npmjs.com/search?q=gulp
○ https://github.com/yeoman/generator-gulp-webapp
Gulp: Task Runner
NodeJS Fundamentals @ BCIT
chris@codespud.ca
@chrisbautista
The End

Contenu connexe

Tendances

Frontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the likeFrontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the likeDamien Seguin
 
Gulp - the streaming build system
Gulp - the streaming build systemGulp - the streaming build system
Gulp - the streaming build systemSergey Romaneko
 
Automating Large Applications on Modular and Structured Form with Gulp
Automating Large Applications on Modular and Structured Form with GulpAutomating Large Applications on Modular and Structured Form with Gulp
Automating Large Applications on Modular and Structured Form with GulpAnderson Aguiar
 
Devenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsDevenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsRémy Savard
 
GulpJs - An Introduction
GulpJs - An IntroductionGulpJs - An Introduction
GulpJs - An IntroductionKnoldus Inc.
 
JavaScript code academy - introduction
JavaScript code academy - introductionJavaScript code academy - introduction
JavaScript code academy - introductionJaroslav Kubíček
 
Getting started with gulpjs
Getting started with gulpjsGetting started with gulpjs
Getting started with gulpjsunmesh dusane
 
Gulp and bower Implementation
Gulp and bower Implementation Gulp and bower Implementation
Gulp and bower Implementation Prashant Shrestha
 
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!tdc-globalcode
 
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開KAI CHU CHUNG
 
Develop - Project Scaffolding
Develop - Project ScaffoldingDevelop - Project Scaffolding
Develop - Project ScaffoldingKevin Cao
 
How we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityHow we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityOvadiah Myrgorod
 
How to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsHow to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsBo-Yi Wu
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IOded Sagir
 
Web development tools { starter pack }
Web development tools { starter pack }Web development tools { starter pack }
Web development tools { starter pack }François Michaudon
 

Tendances (20)

Frontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the likeFrontend JS workflow - Gulp 4 and the like
Frontend JS workflow - Gulp 4 and the like
 
JavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & GruntJavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & Grunt
 
Gulp - the streaming build system
Gulp - the streaming build systemGulp - the streaming build system
Gulp - the streaming build system
 
Automating Large Applications on Modular and Structured Form with Gulp
Automating Large Applications on Modular and Structured Form with GulpAutomating Large Applications on Modular and Structured Form with Gulp
Automating Large Applications on Modular and Structured Form with Gulp
 
Devenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.jsDevenez le plus heureux des Front-end avec Gulp.js
Devenez le plus heureux des Front-end avec Gulp.js
 
GulpJs - An Introduction
GulpJs - An IntroductionGulpJs - An Introduction
GulpJs - An Introduction
 
JavaScript code academy - introduction
JavaScript code academy - introductionJavaScript code academy - introduction
JavaScript code academy - introduction
 
Getting started with gulpjs
Getting started with gulpjsGetting started with gulpjs
Getting started with gulpjs
 
Gulp and bower Implementation
Gulp and bower Implementation Gulp and bower Implementation
Gulp and bower Implementation
 
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!TDC2016SP -  Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
TDC2016SP - Esqueça Grunt ou Gulp. Webpack and NPM rule them all!
 
gulp
gulpgulp
gulp
 
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
60分鐘完送百萬edm,背後雲端ci/cd實戰大公開
 
Develop - Project Scaffolding
Develop - Project ScaffoldingDevelop - Project Scaffolding
Develop - Project Scaffolding
 
How we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown UniversityHow we maintain 200+ Drupal sites in Georgetown University
How we maintain 200+ Drupal sites in Georgetown University
 
Chef training Day4
Chef training Day4Chef training Day4
Chef training Day4
 
How to integrate front end tool via gruntjs
How to integrate front end tool via gruntjsHow to integrate front end tool via gruntjs
How to integrate front end tool via gruntjs
 
Chef training Day5
Chef training Day5Chef training Day5
Chef training Day5
 
The Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session IThe Secrets of The FullStack Ninja - Part A - Session I
The Secrets of The FullStack Ninja - Part A - Session I
 
Chef training - Day3
Chef training - Day3Chef training - Day3
Chef training - Day3
 
Web development tools { starter pack }
Web development tools { starter pack }Web development tools { starter pack }
Web development tools { starter pack }
 

Similaire à Gulp: Task Runner

Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And MavenPerconaPerformance
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDAndi Smith
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...Jesse Gallagher
 
Automating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with GulpAutomating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with GulpMike Hale
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end WorkflowPagepro
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingStanislav Osipov
 
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Philipp Burgmer
 
Replacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with GulpReplacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with GulpTomasz Bak
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
 
Introduction to GulpJs
Introduction to GulpJsIntroduction to GulpJs
Introduction to GulpJsHarish Gadiya
 
Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerMohammed Arif
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them AllTim Fairweather
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCPDana Hoffman
 
How to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environmentHow to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environmentMichelantonio Trizio
 

Similaire à Gulp: Task Runner (20)

Automated Performance Testing With J Meter And Maven
Automated  Performance  Testing With  J Meter And  MavenAutomated  Performance  Testing With  J Meter And  Maven
Automated Performance Testing With J Meter And Maven
 
Quest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFREDQuest for the Perfect Workflow for McrFRED
Quest for the Perfect Workflow for McrFRED
 
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
CollabSphere 2021 - DEV114 - The Nuts and Bolts of CI/CD With a Large XPages ...
 
Automating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with GulpAutomating WordPress Plugin Development with Gulp
Automating WordPress Plugin Development with Gulp
 
Modern web technologies
Modern web technologiesModern web technologies
Modern web technologies
 
Grunt & Front-end Workflow
Grunt & Front-end WorkflowGrunt & Front-end Workflow
Grunt & Front-end Workflow
 
Gulp js
Gulp jsGulp js
Gulp js
 
SCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scalingSCM Puppet: from an intro to the scaling
SCM Puppet: from an intro to the scaling
 
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
 
Replacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with GulpReplacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with Gulp
 
Gulp overview
Gulp overviewGulp overview
Gulp overview
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Introduction to GulpJs
Introduction to GulpJsIntroduction to GulpJs
Introduction to GulpJs
 
Beyond Puppet
Beyond PuppetBeyond Puppet
Beyond Puppet
 
Grunt - The JavaScript Task Runner
Grunt - The JavaScript Task RunnerGrunt - The JavaScript Task Runner
Grunt - The JavaScript Task Runner
 
Why Gradle?
Why Gradle?Why Gradle?
Why Gradle?
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
Infrastructure Management in GCP
Infrastructure Management in GCPInfrastructure Management in GCP
Infrastructure Management in GCP
 
How to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environmentHow to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environment
 
Laziness with Gulp
Laziness with GulpLaziness with Gulp
Laziness with Gulp
 

Dernier

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Gulp: Task Runner

Notes de l'éditeur

  1. Good evening. My name is Chris Bautista. My presentation is about Gulp task runner.
  2. Working as a developer, and I know you might identify with these, we tend to do a lot of other tasks building pages. These are just some of them. As a developer it’s second nature for us improve our workflow. That is where Gulp comes in.
  3. Is a build/automation system built with Javascript and Nodejs. It’s built around the concept of streams as opposed to files like Grunt. Gulp leverages a plugin system to create flexibility in configuring your automated workflows.
  4. Gulp is good for the automating any of the operations listed here and more. 8 sec
  5. Gulp installation is very straightforward You install gulp globally then install it as a development dependency for your projects To configure Gulp tasks, we create and modify gulpfile.js Once configured. Just run the gulp command to execute your tasks
  6. Gulp has features that we should be familiar with.
  7. Tasks are simply function definitions that contain the task you want to run. They can be used to work on simple tasks or more complex jobs. When you run > gulp without switches/parameters you are actually calling the default task.
  8. This is a typical web project structure. You have a src directory where you work, and a build folder where you put your optimized web application to be uploaded to a production server. Gulp enforces this practice
  9. You capture files from a source file or directory then you process it as a stream and save it as you’ve configured it in the dest method.
  10. First is streams
  11. Gulp operates on the concept of streams- to put it simply - streams carry the result of a previous operation and pipes/pushes it to another. This usually does not result in a physical file until the very end of the task. As illustrated here.
  12. this is a sample gulp file showing some common gulp operations. The stream is powered by the pipe method
  13. Watch is another feature of Gulp where you keep an eye/ watch changes on a source file or directory then trigger a predefined task
  14. Gulp’s magic is it numerouse plugins. A plugin is installed via a call in npm. Gulp plugins are always saved as a dev dependency.
  15. Concat plugin simply combines all source files into a stream. SImilar to the cat method in Unix
  16. Gulp-Uglify is a very common minification extension for gulp.
  17. This usually follows a concatenate operation
  18. Browsersync an excellent plugin used with gulp when testing your projects in browsers.
  19. Browser sync is particularly useful when testing your project on multiple screens. Code changes are immediately applied to the browsers without you going to each device and reloading it.
  20. There are other plugins you can use with gulp.
  21. Gulp is a very useful tool that improves the way we tackle our web projects. Next steps, try auditing your workflow now, see if you can automate and improve on certain tasks. then install and configure gulp to do these tasks for you. Explore the many plugins and techniques curated on the gulpjs website to get an idea.
  22. I added some URLs for some additional information.