SlideShare a Scribd company logo
JavaScript Build Automation
Scripts & Task Runners
• In General: Why, What, How?
• Automation with NPM Scripts
• Automation with Task Runners (Gulp)
JavaScript Build Automation
Build automation is the process of automating the
creation of a software build and the associated
processes including: compiling computer source code into
binary code, packaging binary code, and running
automated tests.
— Wikipedia
Why?
Not Waste Time for the Same
Process
Example: Preparing HTML/CSS/JS for
Production
• JS Compilation (TS || ES6 -> ES5)
• Minify
• Concat
• Styles Compilation (Sass || Less -> Css)
• Css Vendor Prefixes && Optimization
• Separately Handling Vendor and Custom Code
• Auto Injecting Files into HTML
• Running Tests
• Push to Production
• …
Example: Awesome Development
Environment
• Browser Live Reloading, File Watching
• JS Compilation
• Styles Compilation
• Linting
• Running Tests
• HTML Injection
Automate Tasks
Code Quality Tests Build Pipeline
What’s in It for You?
Improve Quality Deliver Faster
Repeatable
and Consistent
Automated Build Pipeline
Develop -> Analyze -> Test -> Build -> Deploy
Work Smarter, Not Harder
Automation with NPM Scripts
{
"name": "npm-scripts-tests",
"version": "1.0.0",
"scripts": {
"start": "node server.js",
"build": "tsc --out app.js"
},
"devDependencies": {
...
}
}
Automation with NPM Scripts
{
"name": "npm-scripts-tests",
"version": "1.0.1",
"scripts": {
"build:prod:libs": "bowcat libs.js && uglifyjs lib.js --compress --
mangle --output lib.js",
"build:prod:app": "tsc --out app.js && uglifyjs app.js --compress --
mangle --output app.js",
"build:prod:css": "node-sass src/styles/app.scss --recursive --output-
style compressed --output app.css",
"build:prod": "parallelshell "npm run build:prod:libs" "npm run
build:prod:app" "npm run build:prod:css"",
"build:dev:libs": "bowcat libs.js",
"build:dev:app": "tsc --out app.js",
"build:dev:css": "node-sass src/styles/app.scss --recursive --output-
style compressed --output app.css",
"build:dev": "parallelshell "npm run build:dev:libs" "npm run
build:dev:app" "npm run build:dev:css""
},
"devDependencies": {
...
}
}
Demo
Automation with NPM Scripts
• Build Steps as Shell Commands
• Don't Have the Complexity of a Full Build Tool.
• No Need to Install an Additional Command-line
Tool to Run Your Build.
Automation with Task Runners
http://gruntjs.comhttp://gulpjs.com
Gulp vs Grunt
• Code over Configuration
• More Compact Config
• VFS: No Temp Folders
• Streams Parallelism
Automation with Task Runners
• The Full Power of Node and JavaScript
• Consistent APIs Optimized for Composing Build
Tasks
• Huge Ecosystems of Plugins
• Avoid Cross-platform Compatibility Problems
Typical Gulp Task
File System -> Read Files -> Modify -> Modify ->
-> Modify -> Write Files -> Dest
Gulpfile.js
gulp.task('js', function() {

return gulp

.src('**/*.js')

.pipe($.eslint())

.pipe($.concat())

.pipe($.uglify())
.pipe(gulp.dest('./build/'))

})
Demo
Useful Links: NPM Scripts vs Task
Runners
	 •	 Build Tools vs npm Scripts: Why Not Both?

	 •	 Give Grunt the Boot! A Guide to Using npm as a Build Tool

	 •	 How to Use npm as a Build Tool

	 •	 Task Automation with npm Run

	 •	 Using npm as a Build System for Your next Project
Useful Resources to Learn
• 	 Whole Picture [read]

• 	 learn.javascript.ru Screen Cast Gulp [watch]

•	 Getting Started with Gulp [read][$]

•	 Gulp Basics [watch][$]

•	 JavaScript Build Automation With Gulp.js [watch][$]

•	 Learning Gulp - Getting Started with the Front End Factory [read]

•	 Rapid Gulp [watch][$]

•	 Using npm as a Task Runner [watch][$]

More Related Content

What's hot

Tc open-doors-day-speech
Tc open-doors-day-speechTc open-doors-day-speech
Tc open-doors-day-speech
Evgeniy Koshkin
 
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
AWSKRUG - AWS한국사용자모임
 
JavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & GruntJavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & Grunt
Lohith Goudagere Nagaraj
 
Slim PHP when you don't need the kitchen sink
Slim PHP   when you don't need the kitchen sinkSlim PHP   when you don't need the kitchen sink
Slim PHP when you don't need the kitchen sink
Joe Ferguson
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teams
Mahesh Arali
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programming
Jason Straughan
 
JSFoo-2017 Takeaways
JSFoo-2017 TakeawaysJSFoo-2017 Takeaways
JSFoo-2017 Takeaways
Mir Ali
 
Coffee script final
Coffee script finalCoffee script final
Coffee script final
priyankazope
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
Sascha Möllering
 
Build App with Nodejs - YWC Workshop
Build App with Nodejs - YWC WorkshopBuild App with Nodejs - YWC Workshop
Build App with Nodejs - YWC Workshop
Sarunyhot Suwannachoti
 
Anton Boyko, "The evolution of microservices platform or marketing gibberish"
Anton Boyko, "The evolution of microservices platform or marketing gibberish"Anton Boyko, "The evolution of microservices platform or marketing gibberish"
Anton Boyko, "The evolution of microservices platform or marketing gibberish"
Sigma Software
 
Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"
Fwdays
 
Angular workflow with gulp.js
Angular workflow with gulp.jsAngular workflow with gulp.js
Angular workflow with gulp.js
Cihad Horuzoğlu
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
Kevin Poorman
 
CLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.jsCLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.js
Karolis Labrencis
 
Scaling WordPress - WP on AWS
Scaling WordPress - WP on AWSScaling WordPress - WP on AWS
Scaling WordPress - WP on AWS
stk_jj
 
Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!
Julien Biezemans
 
Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...
Katherine Golovinova
 
Azue Webjobs
Azue WebjobsAzue Webjobs
Azue Webjobs
Akila Iroshan
 
Big Data DC - BenchPress
Big Data DC - BenchPressBig Data DC - BenchPress
Big Data DC - BenchPress
Drew Stephens
 

What's hot (20)

Tc open-doors-day-speech
Tc open-doors-day-speechTc open-doors-day-speech
Tc open-doors-day-speech
 
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
 
JavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & GruntJavaScript Task Runners - Gulp & Grunt
JavaScript Task Runners - Gulp & Grunt
 
Slim PHP when you don't need the kitchen sink
Slim PHP   when you don't need the kitchen sinkSlim PHP   when you don't need the kitchen sink
Slim PHP when you don't need the kitchen sink
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teams
 
The future of cloud programming
The future of cloud programmingThe future of cloud programming
The future of cloud programming
 
JSFoo-2017 Takeaways
JSFoo-2017 TakeawaysJSFoo-2017 Takeaways
JSFoo-2017 Takeaways
 
Coffee script final
Coffee script finalCoffee script final
Coffee script final
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Build App with Nodejs - YWC Workshop
Build App with Nodejs - YWC WorkshopBuild App with Nodejs - YWC Workshop
Build App with Nodejs - YWC Workshop
 
Anton Boyko, "The evolution of microservices platform or marketing gibberish"
Anton Boyko, "The evolution of microservices platform or marketing gibberish"Anton Boyko, "The evolution of microservices platform or marketing gibberish"
Anton Boyko, "The evolution of microservices platform or marketing gibberish"
 
Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"Anton Boyko "The future of serverless computing"
Anton Boyko "The future of serverless computing"
 
Angular workflow with gulp.js
Angular workflow with gulp.jsAngular workflow with gulp.js
Angular workflow with gulp.js
 
Ci of js and apex using jasmine, phantom js and drone io df14
Ci of js and apex using jasmine, phantom js and drone io   df14Ci of js and apex using jasmine, phantom js and drone io   df14
Ci of js and apex using jasmine, phantom js and drone io df14
 
CLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.jsCLI utility in ClojureScript running on Node.js
CLI utility in ClojureScript running on Node.js
 
Scaling WordPress - WP on AWS
Scaling WordPress - WP on AWSScaling WordPress - WP on AWS
Scaling WordPress - WP on AWS
 
Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!Cucumber.js: Cuke up your JavaScript!
Cucumber.js: Cuke up your JavaScript!
 
Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...
 
Azue Webjobs
Azue WebjobsAzue Webjobs
Azue Webjobs
 
Big Data DC - BenchPress
Big Data DC - BenchPressBig Data DC - BenchPress
Big Data DC - BenchPress
 

Viewers also liked

Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
The rise of single-page applications
The rise of single-page applicationsThe rise of single-page applications
The rise of single-page applications
Caridy Patino
 
Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with Grunt
Ladies Who Code
 
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
Tieturi Oy
 
An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)
frontendne
 
Single page applications
Single page applicationsSingle page applications
Single page applications
Rumesh Hapuarachchi
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster
Boris Livshutz
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
Dor Kalev
 
Single page applications
Single page applicationsSingle page applications
Single page applications
Diego Cardozo
 
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2
Oleksii Prohonnyi
 
Npm scripts
Npm scriptsNpm scripts
Npm scripts
정윤 김
 
Single page application
Single page applicationSingle page application
Single page application
Jeremy Lee
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
Massimo Iacolare
 
Measuring the Performance of Single Page Applications
Measuring the Performance of Single Page ApplicationsMeasuring the Performance of Single Page Applications
Measuring the Performance of Single Page Applications
Nicholas Jansma
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applications
SC5.io
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
KMS Technology
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
M R Rony
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
postmanclient
 

Viewers also liked (18)

Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012Single Page Applications - Desert Code Camp 2012
Single Page Applications - Desert Code Camp 2012
 
The rise of single-page applications
The rise of single-page applicationsThe rise of single-page applications
The rise of single-page applications
 
Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with Grunt
 
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
27.1.2014, Tampere. Perinteinen mobiilimaailma murroksessa. Petri Niemi: Sing...
 
An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)An introduction in to the world of front end automation - frontend ne (02 07-15)
An introduction in to the world of front end automation - frontend ne (02 07-15)
 
Single page applications
Single page applicationsSingle page applications
Single page applications
 
Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster Making Single Page Applications (SPA) faster
Making Single Page Applications (SPA) faster
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
 
Single page applications
Single page applicationsSingle page applications
Single page applications
 
Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2Front-end development introduction (JavaScript). Part 2
Front-end development introduction (JavaScript). Part 2
 
Npm scripts
Npm scriptsNpm scripts
Npm scripts
 
Single page application
Single page applicationSingle page application
Single page application
 
Single Page Applications
Single Page ApplicationsSingle Page Applications
Single Page Applications
 
Measuring the Performance of Single Page Applications
Measuring the Performance of Single Page ApplicationsMeasuring the Performance of Single Page Applications
Measuring the Performance of Single Page Applications
 
Building single page applications
Building single page applicationsBuilding single page applications
Building single page applications
 
Introduction To Single Page Application
Introduction To Single Page ApplicationIntroduction To Single Page Application
Introduction To Single Page Application
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
 

Similar to Js Automation. npm scripts & Gulp

Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
Ryan Cuprak
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
Amazon Web Services
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
David Voyles
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
Ryan Cuprak
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
Md. Ziaul Haq
 
Aws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon ElishaAws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon Elisha
Helen Rogers
 
Grunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End TierGrunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End Tier
Erick Brito
 
Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017
Amazon Web Services
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
Amazon Web Services
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Amazon Web Services
 
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryDevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
Amazon Web Services
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
Alberto Molina Coballes
 
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
Amazon Web Services
 
Devops
DevopsDevops
Devops
JyothirmaiG4
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
Khaled Mosharraf
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver Faster
Amazon Web Services
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
Amazon Web Services
 
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
Amazon Web Services
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
Code Mastery
 

Similar to Js Automation. npm scripts & Gulp (20)

Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
Getting started with Emscripten – Transpiling C / C++ to JavaScript / HTML5
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
 
Aws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon ElishaAws-What You Need to Know_Simon Elisha
Aws-What You Need to Know_Simon Elisha
 
Grunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End TierGrunt Continuous Development of the Front End Tier
Grunt Continuous Development of the Front End Tier
 
Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017Configuration Management in the Cloud | AWS Public Sector Summit 2017
Configuration Management in the Cloud | AWS Public Sector Summit 2017
 
Application Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless WorldApplication Lifecycle Management in a Serverless World
Application Lifecycle Management in a Serverless World
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
DevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software DeliveryDevOps on AWS - Accelerating Software Delivery
DevOps on AWS - Accelerating Software Delivery
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
AWS re:Invent 2016: Application Lifecycle Management in a Serverless World (S...
 
Devops
DevopsDevops
Devops
 
Beginners Node.js
Beginners Node.jsBeginners Node.js
Beginners Node.js
 
SRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver FasterSRV312 DevOps on AWS: Building Systems to Deliver Faster
SRV312 DevOps on AWS: Building Systems to Deliver Faster
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
 
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
ENT201 A Tale of Two Pizzas: Accelerating Software Delivery with AWS Develope...
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 

Recently uploaded

Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 

Recently uploaded (20)

Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 

Js Automation. npm scripts & Gulp

  • 2. • In General: Why, What, How? • Automation with NPM Scripts • Automation with Task Runners (Gulp) JavaScript Build Automation
  • 3. Build automation is the process of automating the creation of a software build and the associated processes including: compiling computer source code into binary code, packaging binary code, and running automated tests. — Wikipedia
  • 5. Not Waste Time for the Same Process
  • 6. Example: Preparing HTML/CSS/JS for Production • JS Compilation (TS || ES6 -> ES5) • Minify • Concat • Styles Compilation (Sass || Less -> Css) • Css Vendor Prefixes && Optimization • Separately Handling Vendor and Custom Code • Auto Injecting Files into HTML • Running Tests • Push to Production • …
  • 7. Example: Awesome Development Environment • Browser Live Reloading, File Watching • JS Compilation • Styles Compilation • Linting • Running Tests • HTML Injection
  • 8. Automate Tasks Code Quality Tests Build Pipeline
  • 9. What’s in It for You? Improve Quality Deliver Faster Repeatable and Consistent
  • 10. Automated Build Pipeline Develop -> Analyze -> Test -> Build -> Deploy
  • 12. Automation with NPM Scripts { "name": "npm-scripts-tests", "version": "1.0.0", "scripts": { "start": "node server.js", "build": "tsc --out app.js" }, "devDependencies": { ... } }
  • 13. Automation with NPM Scripts { "name": "npm-scripts-tests", "version": "1.0.1", "scripts": { "build:prod:libs": "bowcat libs.js && uglifyjs lib.js --compress -- mangle --output lib.js", "build:prod:app": "tsc --out app.js && uglifyjs app.js --compress -- mangle --output app.js", "build:prod:css": "node-sass src/styles/app.scss --recursive --output- style compressed --output app.css", "build:prod": "parallelshell "npm run build:prod:libs" "npm run build:prod:app" "npm run build:prod:css"", "build:dev:libs": "bowcat libs.js", "build:dev:app": "tsc --out app.js", "build:dev:css": "node-sass src/styles/app.scss --recursive --output- style compressed --output app.css", "build:dev": "parallelshell "npm run build:dev:libs" "npm run build:dev:app" "npm run build:dev:css"" }, "devDependencies": { ... } }
  • 14. Demo
  • 15. Automation with NPM Scripts • Build Steps as Shell Commands • Don't Have the Complexity of a Full Build Tool. • No Need to Install an Additional Command-line Tool to Run Your Build.
  • 16. Automation with Task Runners http://gruntjs.comhttp://gulpjs.com
  • 17. Gulp vs Grunt • Code over Configuration • More Compact Config • VFS: No Temp Folders • Streams Parallelism
  • 18. Automation with Task Runners • The Full Power of Node and JavaScript • Consistent APIs Optimized for Composing Build Tasks • Huge Ecosystems of Plugins • Avoid Cross-platform Compatibility Problems
  • 19. Typical Gulp Task File System -> Read Files -> Modify -> Modify -> -> Modify -> Write Files -> Dest
  • 20. Gulpfile.js gulp.task('js', function() {
 return gulp
 .src('**/*.js')
 .pipe($.eslint())
 .pipe($.concat())
 .pipe($.uglify()) .pipe(gulp.dest('./build/'))
 })
  • 21. Demo
  • 22. Useful Links: NPM Scripts vs Task Runners • Build Tools vs npm Scripts: Why Not Both? • Give Grunt the Boot! A Guide to Using npm as a Build Tool • How to Use npm as a Build Tool • Task Automation with npm Run • Using npm as a Build System for Your next Project
  • 23. Useful Resources to Learn • Whole Picture [read] • learn.javascript.ru Screen Cast Gulp [watch] • Getting Started with Gulp [read][$] • Gulp Basics [watch][$] • JavaScript Build Automation With Gulp.js [watch][$] • Learning Gulp - Getting Started with the Front End Factory [read] • Rapid Gulp [watch][$] • Using npm as a Task Runner [watch][$]