SlideShare una empresa de Scribd logo
1 de 32
1
Rapid Web Development with Angular,
Yeoman, Bower, Grunt
Hongbiao Chen
Sr. Principal Web Developer
Rapid Web Development With Angular, Yeoman, Bower, Grunt
David Close
Principal Web Developer
CUTTING EDGE 2015
Agenda
Rapid Web Development With Angular, Yeoman, Bower, Grunt 2
Unicon project1
Angular, Yeoman, Bower, Protractor, Grunt2
Demo3
CUTTING EDGE 2015
Project Unicon
3Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Project Unicon - Cart
4Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Project Unicon – Purchase flow
5Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Project Unicon – Certificate enrollment flow
6Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Technology & Tools
Rapid Web Development With Angular, Yeoman, Bower, Grunt 7
Angular1
Yeoman2
Bower3
Protractor4
Grunt5
CUTTING EDGE 2015
AngularJS
HTML Enhanced for Web Apps
8Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
AngularJS Concepts
9Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Yeoman
The Web’s Scaffolding Tool for Modern Webapps
npm install –g yo
10Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Generator ecosystem
11Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Sub-generators from angular-fullstack
12Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Bower
A package manager for the web
npm install –g bower
13Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Bower.json
{
"name": "unicon",
"version": "0.0.0",
"dependencies": {
"angular": ">=1.2.*",
"json3": "~3.3.1",
"es5-shim": "~3.0.1",
"jquery": "~1.11.0",
"bootstrap-sass-official": "~3.1.1",
"bootstrap": "~3.1.1",
"angular-resource": ">=1.2.*",
"angular-cookies": ">=1.2.*",
"angular-sanitize": ">=1.2.*",
"angular-bootstrap": "~0.11.0",
"font-awesome": ">=4.1.0",
"lodash": "~2.4.1",
"angular-ui-router": "~0.2.10"
},
"devDependencies": {
"angular-mocks": ">=1.2.*",
"angular-scenario": ">=1.2.*"
}
}
14Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Protractor
End to End Testing for AngularJS
http://angular.github.io/protractor/#/
15Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Protractor
http://angular.github.io/protractor/#/
16Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
protractor.conf.js
'use strict';
exports.config = {
allScriptsTimeout: 110000,
baseUrl: 'http://localhost:' + (process.env.PORT || '9000'),
specs: [
'e2e/**/*.spec.js'
],
capabilities: {
'browserName': 'chrome'
},
framework: 'jasmine',
};
17Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Grunt
The JavaScript Task Runner
http://gruntjs.com/
18Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Installation
//install the grunt-cli globally
$ npm install -g grunt-cli
//do this once for each project, or after
modifying the package.json file
$ npm install
$ grunt
19Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Plugins
grunt-contrib-watch
grunt-contrib-jshint
grunt-contrib-uglify
grunt-contrib-copy
grunt-contrib-concat
grunt-karma
grunt-concurrent
20Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
// task configurations go here
});
};
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['uglify']);
grunt.registerTask('deploy', ['concat', 'uglify']);
21Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
grunt-contrib-watch
watch: {
scripts: {
files: ['src/**/*.js'],
tasks: ['copy']
}
}
22Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
grunt-contrib-watch
watch: {
scripts: {
files: ['src/**/*.js'],
tasks: ['jshint','uglify','copy']
}
}
23Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
grunt-contrib-jshint
jshint: {
options: {
indent: false,
curly: true
},
files: {
src: ['Gruntfile.js', 'src/**/*.js']
}
}
24Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
grunt-contrib-jasmine
jasmine: {
yourTask: {
src: 'src/**/*.js',
options: {
specs: 'spec/*Spec.js',
template: require('grunt-template-
jasmine-requirejs')
}
}
}
25Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015 26Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
grunt-contrib-concat
concat: {
options: {
separator: ';'
},
dist: {
src: ['src/**/*.js'],
dest: 'dist/built.js'
}
}
27Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
grunt-concurrent
grunt.initConfig({
concurrent: {
first: ['concat'],
second: ['uglify', 'imagemin']
}
});
grunt.registerTask('deploy',[
'concurrent:first',
'concurrent:second'
]);
28Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Grunt
http://gruntjs.com
29Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Gruntfile.js
grunt.registerTask('build', [
'clean:dist',
'injector:sass',
'concurrent:dist',
'injector',
'wiredep',
'useminPrepare',
'autoprefixer',
'ngtemplates',
'concat',
'ngAnnotate',
'copy:dist',
'cdnify',
'cssmin',
'uglify',
'rev',
'usemin'
]);
grunt.registerTask('default', [
'newer:jshint',
'test',
'build'
]);
30Rapid Web Development With Angular, Yeoman, Bower, Grunt
CUTTING EDGE 2015
Work flow
Rapid Web Development With Angular, Yeoman, Bower, Grunt 31
yo angular-fullstack unicon1
yo angular-fullstack:service cart2
yo angular-fullstack:route order3
yo angular-fullstack:directive price-box4
yo angular-fullstack:directive shopping-guide5
CUTTING EDGE 2015Rapid Web Development With Angular, Yeoman, Bower, Grunt 32
Questions?

Más contenido relacionado

La actualidad más candente

[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...
[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...
[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...François-Guillaume Ribreau
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 
Instant app Intro
Instant app IntroInstant app Intro
Instant app IntroJintin Lin
 
Evolution of GitLab Frontend
Evolution of GitLab FrontendEvolution of GitLab Frontend
Evolution of GitLab FrontendFatih Acet
 
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Matt Raible
 
Use groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projectsUse groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projectsFátima Casaú Pérez
 
[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...
[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...
[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...François-Guillaume Ribreau
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017Matt Raible
 
Front Ends for Back End Developers - Spring I/O 2017
Front Ends for Back End Developers - Spring I/O 2017Front Ends for Back End Developers - Spring I/O 2017
Front Ends for Back End Developers - Spring I/O 2017Matt Raible
 
JHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan BlochJHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan BlochGaëtan Bloch
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017Matt Raible
 
Bootiful Development with Spring Boot and Angular - Spring I/O 2017
Bootiful Development with Spring Boot and Angular - Spring I/O 2017Bootiful Development with Spring Boot and Angular - Spring I/O 2017
Bootiful Development with Spring Boot and Angular - Spring I/O 2017Matt Raible
 
ApacheCon 2011
ApacheCon 2011ApacheCon 2011
ApacheCon 2011mwbrooks
 
Hello PhoneGap
Hello PhoneGapHello PhoneGap
Hello PhoneGapmwbrooks
 
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017Matt Raible
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsShashikant Jagtap
 

La actualidad más candente (20)

[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...
[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...
[BreizhCamp, format 15min] Construire et automatiser l'ecosystème de son Saa...
 
Android instant app
Android instant appAndroid instant app
Android instant app
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Instant app Intro
Instant app IntroInstant app Intro
Instant app Intro
 
Evolution of GitLab Frontend
Evolution of GitLab FrontendEvolution of GitLab Frontend
Evolution of GitLab Frontend
 
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
 
Use groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projectsUse groovy & grails in your spring boot projects
Use groovy & grails in your spring boot projects
 
[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...
[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...
[BreizhCamp, format 15min] Une api rest et GraphQL sans code grâce à PostgR...
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017
 
Front Ends for Back End Developers - Spring I/O 2017
Front Ends for Back End Developers - Spring I/O 2017Front Ends for Back End Developers - Spring I/O 2017
Front Ends for Back End Developers - Spring I/O 2017
 
JHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan BlochJHipster presentation by Gaetan Bloch
JHipster presentation by Gaetan Bloch
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
Bootiful Development with Spring Boot and Angular - Spring I/O 2017
Bootiful Development with Spring Boot and Angular - Spring I/O 2017Bootiful Development with Spring Boot and Angular - Spring I/O 2017
Bootiful Development with Spring Boot and Angular - Spring I/O 2017
 
React native - What, Why, How?
React native - What, Why, How?React native - What, Why, How?
React native - What, Why, How?
 
ApacheCon 2011
ApacheCon 2011ApacheCon 2011
ApacheCon 2011
 
Future of Grails
Future of GrailsFuture of Grails
Future of Grails
 
AngularJS
AngularJSAngularJS
AngularJS
 
Hello PhoneGap
Hello PhoneGapHello PhoneGap
Hello PhoneGap
 
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
 
iOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and SaucelabsiOS Automation with Cucumber, Appium and Saucelabs
iOS Automation with Cucumber, Appium and Saucelabs
 

Similar a Rapid Web Development with Angular, Yeoman, Bower, Grunt Tools

Web applications support on AGL
Web applications support on AGLWeb applications support on AGL
Web applications support on AGLIgalia
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Natalia Efimtseva
 
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern WebPlaywright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern WebApplitools
 
Deep crawl the chaotic landscape of JavaScript
Deep crawl the chaotic landscape of JavaScript Deep crawl the chaotic landscape of JavaScript
Deep crawl the chaotic landscape of JavaScript Onely
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular elementHimanshu Tamrakar
 
以 Kotlin 快速打造 Mobile Backend
以 Kotlin 快速打造 Mobile Backend以 Kotlin 快速打造 Mobile Backend
以 Kotlin 快速打造 Mobile BackendShengyou Fan
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performanceAndrew Siemer
 
Building for, perceiving and measuring performance for mobile web
Building for, perceiving and measuring performance for mobile webBuilding for, perceiving and measuring performance for mobile web
Building for, perceiving and measuring performance for mobile webRobin Glen
 
Breaking News and Breaking Software by Andy Hume
Breaking News and Breaking Software by Andy HumeBreaking News and Breaking Software by Andy Hume
Breaking News and Breaking Software by Andy HumeSyncConf
 
Browser Automation with Playwright – for integration, RPA, UI testing and mor...
Browser Automation with Playwright – for integration, RPA, UI testing and mor...Browser Automation with Playwright – for integration, RPA, UI testing and mor...
Browser Automation with Playwright – for integration, RPA, UI testing and mor...Lucas Jellema
 
Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017Robert Nyman
 
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEMDo more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEMBob Paulin
 
Supercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeSupercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeOptimizely
 
Rapidly scaffold your frontend with yeoman
Rapidly scaffold your frontend with yeomanRapidly scaffold your frontend with yeoman
Rapidly scaffold your frontend with yeomanSimon Waibl
 
Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.
Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.
Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.Globant
 
Web Performance Matters: Challenges, Solutions, Best Practices
Web Performance Matters: Challenges, Solutions, Best PracticesWeb Performance Matters: Challenges, Solutions, Best Practices
Web Performance Matters: Challenges, Solutions, Best PracticesCloudflare
 

Similar a Rapid Web Development with Angular, Yeoman, Bower, Grunt Tools (20)

Web applications support on AGL
Web applications support on AGLWeb applications support on AGL
Web applications support on AGL
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)
 
Keynote I
Keynote IKeynote I
Keynote I
 
Playwright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern WebPlaywright: A New Test Automation Framework for the Modern Web
Playwright: A New Test Automation Framework for the Modern Web
 
Web Leaps Forward
Web Leaps ForwardWeb Leaps Forward
Web Leaps Forward
 
Deep crawl the chaotic landscape of JavaScript
Deep crawl the chaotic landscape of JavaScript Deep crawl the chaotic landscape of JavaScript
Deep crawl the chaotic landscape of JavaScript
 
Web componenet using angular element
Web componenet using angular elementWeb componenet using angular element
Web componenet using angular element
 
以 Kotlin 快速打造 Mobile Backend
以 Kotlin 快速打造 Mobile Backend以 Kotlin 快速打造 Mobile Backend
以 Kotlin 快速打造 Mobile Backend
 
20 tips for website performance
20 tips for website performance20 tips for website performance
20 tips for website performance
 
Building for, perceiving and measuring performance for mobile web
Building for, perceiving and measuring performance for mobile webBuilding for, perceiving and measuring performance for mobile web
Building for, perceiving and measuring performance for mobile web
 
Breaking News and Breaking Software by Andy Hume
Breaking News and Breaking Software by Andy HumeBreaking News and Breaking Software by Andy Hume
Breaking News and Breaking Software by Andy Hume
 
Yeoman Workflow
Yeoman WorkflowYeoman Workflow
Yeoman Workflow
 
Browser Automation with Playwright – for integration, RPA, UI testing and mor...
Browser Automation with Playwright – for integration, RPA, UI testing and mor...Browser Automation with Playwright – for integration, RPA, UI testing and mor...
Browser Automation with Playwright – for integration, RPA, UI testing and mor...
 
Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017Building for Your Next Billion - Google I/O 2017
Building for Your Next Billion - Google I/O 2017
 
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEMDo more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
Do more with LESS, Handlebars, Coffeescript and other Web Resources in AEM
 
Supercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the EdgeSupercharging Optimizely Performance by Moving Decisions to the Edge
Supercharging Optimizely Performance by Moving Decisions to the Edge
 
Rapidly scaffold your frontend with yeoman
Rapidly scaffold your frontend with yeomanRapidly scaffold your frontend with yeoman
Rapidly scaffold your frontend with yeoman
 
Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.
Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.
Globant Week Cali - Entendiendo el desarrollo Front-end del mundo moderno.
 
Web Performance Matters: Challenges, Solutions, Best Practices
Web Performance Matters: Challenges, Solutions, Best PracticesWeb Performance Matters: Challenges, Solutions, Best Practices
Web Performance Matters: Challenges, Solutions, Best Practices
 

Rapid Web Development with Angular, Yeoman, Bower, Grunt Tools