Yeoman

26
1 Automating Front-End Workflow

description

Yeoman is a robust and opinionated client-side stack, comprising tools and frameworks that can help developers quickly build beautiful web applications.

Transcript of Yeoman

Page 1: Yeoman

1

Automating Front-End Workflow

Page 2: Yeoman

2

https://github.com/mdarif

https://twitter.com/#!/arif_iq

http://in.linkedin.com/in/mohdarif

www.mohammedarif.com

Mohammed Arif

A husband, father and a Front End Specialist at Sapient-Nitro.

Page 3: Yeoman

3

AGENDA

What is automation? Why automation?

Old way of doing things New way?

Yeoman Grunt

Grunt Tips Bower Showtime Q & A

Page 4: Yeoman

4

WHAT IS AUTOMATION?

The technique of making a process, or a system operate

automatically.

Page 5: Yeoman

5

WHY AUTOMATION?

To stay productive!

Page 6: Yeoman

6

OLD WAY OF DOING THINGS?

• Scaffolding• Download libraries• Download templates• Download frameworks

• Watch Sass / Less / Stylus • Watch CoffeeScript • Watch Jade / Haml • LiveReload• JS / CSS Linting…

Page 7: Yeoman

7

NEW WAY?

Page 8: Yeoman

8

YEOMAN

Page 9: Yeoman

9

Page 10: Yeoman

10

YEOMAN - Scaffold, write less with Yo

“Yeoman is a robust and opinionated client-side stack, comprising tools and frameworks that can help developers quickly build beautiful web applications”

http://yeoman.io/whyyeoman.html

Page 11: Yeoman

11

• scaffolding, write less with Yo • dependency management with Bower• Wiring and integration of a number of commonly

used grunt tasks• build, preview and test with Grunt• maintained separately• play well together, all part of the Yeoman workflow

YEOMAN - Scaffold, write less with Yo

Page 12: Yeoman

12

YEOMAN - Scaffold, write less with Yo

$ npm install -g yo

Page 13: Yeoman

13

• HTML5 Boilerplate• Twitter Bootstrap• Project Structure• Mocha Tests• RequireJS (optional)• Modernizr (optional)• Build process• ...

YEOMAN - Scaffold, write less with Yo

$ yo webapp

Page 14: Yeoman

14

Page 15: Yeoman

15

GRUNT - Build, preview and test with Grunt

http://www.slideshare.net/arif_iq/grunt-22465541

Grunt is a task-based command line build tool for JavaScript projects.

Page 16: Yeoman

16

TASK-BASED?

• Unit testing• JS linting• Concatenating/minifying• Image optimization• Replace scripts in html files• SASS• …

Page 17: Yeoman

17

GRUNT TIPS

grunt-uncss

Remove unused CSS across your project at build time.

https://github.com/addyosmani/grunt-uncss

Page 18: Yeoman

18

GRUNT TIPS

Build directly from DevTools

grunt-devtools extension

https://github.com/vladikoff/grunt-devtools

Page 19: Yeoman

19

Bower

Page 20: Yeoman

20

BOWER - Manage dependencies with Bower

A package manager for the web.

Page 21: Yeoman

21

BOWER - Manage dependencies with Bower

Runs over:• Git • HTTP(s) • Zip • npm

Page 22: Yeoman

22

BOWER - Manage dependencies with Bower

$ bower search

$ bower search jquery$ bower install

$ bower install jquery –save-dev

$ bower list

Page 23: Yeoman

23

BOWER - Manage dependencies with Bower

https://egghead.io/lessons/bower-introduction-and-setup

• maintained by Twitter and the open-source community

• configuration in bower.json

Page 24: Yeoman

24

SHOWTIME

Page 25: Yeoman

Q & A

Page 26: Yeoman

26

Thank You!