Saturday, 23 April 2016

What is yeoman, bower and grunt & How it works with angularjs ??

*** Yeoman is a collection of three tools - called Yo, Grunt, and Bower - that allow developers to concentrate on building the functionality of an application, rather than working to build its infrastructure.

*** Yo handles scaffolding of the application, while Grunt takes care of build processes and Bower manages the application's dependencies.

During development, these tools will do things like create the development environment, automatically reload the browser when changes are saved, handle notification for Angular apps, and make sure packages are up-to-date. When it comes time to deploy, they'll minify all of the app's code, optimize images, compile CoffeeScript and Compass files, and package the app for distribution.

Yeoman is a tool that provides a great starting point for building apps in all kinds of different frameworks. Because it includes so many frameworks each community maintains their respective generator and the generator will follow those sets of best practices. The one for Angular uses Bower for dependencies and grunt for tasks. It will also include Karma etc.

Yeoman can also run your unit tests, minimize and concatenate your code, optimize images etc.

Yeoman can fire up a preview web server and watch your files for edits in order to live reload changes and compile your Sass.

*** Bower is a package manager for front-end modules that are usually comprised of JavaScript and/or CSS.

Bower assumes for easily search for, install, update, or remove these front-end dependencies.

The advantage to using Bower is that you do not have to bundle external dependencies with your project when you distribute it. Bower will take care of the third-party code when you run bower install and get those dependencies to the right locations. It also makes the final project package smaller for distribution.

Bower is a package manager for the web.

*** Grunt is used to build, preview, and test your project.

Grunt is a great tool for automating many things in our applications. From minifying files, processing LESS, linting our JS files, and so much more.

it is just easier to have Grunt start and watch our Node server for changes, process those changes/run tasks, and keep our restart our server for us.

We don’t have to run separate Grunt and node (or nodemon) commands and having just telling people to run grunt is simple enough.


How to install these all terms, which i discussed above through terminal
---------------------------------------------------------------------------------------

npm install -g yo grunt-cli bower    (-g gor globally installation)

npm install -g generator-angular

yo angular

bower install

npm install - for fetching all dependencies from bower.json and all

npm start  -- for starting grunt server.

grunt serve

======================================================
Write these command before any installation to take an updated version and all

sudo apt-get update
sudo apt-get update-all
sudo apt-get upgrade
sudo apt-get upgrade-all

No comments:

Post a Comment

JSP interview questions and answers

Q1. What is JSP and why do we need it? JSP stands for JavaServer Pages. JSP is java server side technology to create dynamic web pages. J...