Gulp vs Grunt and Bower

25
Grunt vs Gulp and Bower Created by Kyryll Kozak JS 099

Transcript of Gulp vs Grunt and Bower

Page 1: Gulp vs Grunt and Bower

Grunt vs Gulp and Bower

Created by Kyryll KozakJS 099

Page 2: Gulp vs Grunt and Bower

Bower

Page 3: Gulp vs Grunt and Bower

Bower is package manager

It helps us with our dependencies

Page 4: Gulp vs Grunt and Bower

How to use?

npm install –g bower

Page 5: Gulp vs Grunt and Bower

COMMANDS

bower –versionbower search jquerybower info jquerybower install jquery#1.6.4 -SAVEbower list --path(how in fast way add url to index.html)bower uninstall jquery normalize.css -SAVE

Page 6: Gulp vs Grunt and Bower

The difference?

Page 7: Gulp vs Grunt and Bower

Answer

Page 8: Gulp vs Grunt and Bower
Page 9: Gulp vs Grunt and Bower

Tip: Two copies of dep a

Nested system

Page 10: Gulp vs Grunt and Bower

Flat system

Page 11: Gulp vs Grunt and Bower

About dependencies• We need file manifest• To create it we need to write bower init• And follow the instruction that appears• After we will see something something like in

the picture

Page 12: Gulp vs Grunt and Bower

ASD

Page 13: Gulp vs Grunt and Bower

ASD

Pros and ConsFlat• The simpler of the two designs. It's up to you to decide how much complexity you want to

deal with.• Dependency conflicts (AKA dependency hell)• Sometimes the only option for languages where you cannot load dependencies in isolation• Nested• No dependency conflicts• Encourages use of small, isolated modules• More complicated• Good for languages like JavaScript with first class scoping support for isolating dependencies

from each other• Installs multiple copies of dependencies (when necessary), so takes up more disk space

(though in practice this is rarely an issue because code is small).• Confuses users who use dependencies that aren't designed to be modular (e.g. 'Why do I

have five versions of jQuery in my browserify app?')

Page 14: Gulp vs Grunt and Bower

Кстати, при произношении слова "галп" не нужен мягкий знак, буква "л" твёрдая

Page 15: Gulp vs Grunt and Bower

Tip: Look in notebook (marked green)

About Gulp and …

• Gulp is task runner to automate everything that can be automated (i.e compile css/sass, optimize images, make a bundle and minify/transpite it)

• This description coming to Grunt too

Page 16: Gulp vs Grunt and Bower

The difference?

Tip: Look in notebook (marked green)

Page 17: Gulp vs Grunt and Bower

Answer

Page 18: Gulp vs Grunt and Bower

An example of Grunt task

Tip: Look in your notebook (5)

Page 19: Gulp vs Grunt and Bower

How Grunt works

Page 20: Gulp vs Grunt and Bower

What makes Gulp more comfortable to create build system?

Vinyl FS

Tip: 2 clicks

Page 21: Gulp vs Grunt and Bower

Tip: Look in your notebook (2)

How Gulp works

Page 22: Gulp vs Grunt and Bower

An example of Gulp task

Tip: Look in your notebook (2-3)

Page 23: Gulp vs Grunt and Bower

ASD

An example of Gulp task

Page 24: Gulp vs Grunt and Bower

Tip: (4)

Gulp stream parallelism???

Page 25: Gulp vs Grunt and Bower

Thank you!