SlideShare a Scribd company logo
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?

More Related Content

PDF
Building Cloud Native Progressive Web Apps with Angular and Spring Boot - Dev...
PDF
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
PDF
GR8Conf 2015 - Spring Boot and Groovy. What more do you need?
PDF
Testing Angular Applications - Jfokus 2017
PDF
Cloud Native Progressive Web Applications - Denver JUG 2016
PDF
Cloud Native PWAs (progressive web apps with Spring Boot and Angular) - DevNe...
PDF
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
PDF
What's New in JHipsterLand - DevNexus 2017
Building Cloud Native Progressive Web Apps with Angular and Spring Boot - Dev...
Developing PWAs and Mobile Apps with Ionic, Angular, and JHipster - Devoxx Mo...
GR8Conf 2015 - Spring Boot and Groovy. What more do you need?
Testing Angular Applications - Jfokus 2017
Cloud Native Progressive Web Applications - Denver JUG 2016
Cloud Native PWAs (progressive web apps with Spring Boot and Angular) - DevNe...
Building a PWA with Ionic, Angular and Spring Boot - Jfokus 2017
What's New in JHipsterLand - DevNexus 2017

What's hot (20)

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

Similar to Rapid development with angular (20)

PDF
Front-end tools
PDF
Grunt & Front-end Workflow
PPTX
Frontend Workflow
PPTX
Front end task automation using grunt, yeoman and npm(1)
PPT
Bootstrapping angular js with bower grunt yeoman
PDF
Front end workflow with yeoman
PDF
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
PDF
Yeoman Workflow
PDF
Frontend Build Tools - CC FE & UX
PDF
Grunt.js and Yeoman, Continous Integration
PDF
The MEAN stack - SoCalCodeCamp - june 29th 2014
PDF
Yeoman + Grunt + Bower - Google I/O Rewind Sri Lanka
ODP
What grunt?
PDF
Grunt All Day
PDF
JLPDevs - Optimization Tooling for Modern Web App Development
PDF
Introducing RaveJS: Spring Boot concepts for JavaScript applications
PDF
Modern Web Application Development Workflow - web2day 2014
PPTX
How NOT to get lost in the current JavaScript landscape
PPSX
Yeoman - Santa Barbara JavaScript Meetup
PDF
Yeoman + grunt + bower
Front-end tools
Grunt & Front-end Workflow
Frontend Workflow
Front end task automation using grunt, yeoman and npm(1)
Bootstrapping angular js with bower grunt yeoman
Front end workflow with yeoman
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Yeoman Workflow
Frontend Build Tools - CC FE & UX
Grunt.js and Yeoman, Continous Integration
The MEAN stack - SoCalCodeCamp - june 29th 2014
Yeoman + Grunt + Bower - Google I/O Rewind Sri Lanka
What grunt?
Grunt All Day
JLPDevs - Optimization Tooling for Modern Web App Development
Introducing RaveJS: Spring Boot concepts for JavaScript applications
Modern Web Application Development Workflow - web2day 2014
How NOT to get lost in the current JavaScript landscape
Yeoman - Santa Barbara JavaScript Meetup
Yeoman + grunt + bower
Ad

Rapid development with angular