Wednesday, August 24, 2016

How to create angular project using YEOMAN

Create angular project using YEOMAN :

Create a project folder and go inside. ($ mkdir FST, $cd FST)
Please install node.js and npm package manager globally using option "-g” as it can be used in other places for different projects.

- node.js can be installed from npm is installed as a part of the node. 
- To get latest npm, run the following command “sudo npm install npm -g” 

Install yo and webapp generator (

- npm install -g yo
- npm install -g generator-webapp

Install bower, a package manager. (

- npm install -g bower

Create new project using generator
- yo webapp
- Select the options during the process. I have selected “Bootstrap” and “BDD”

Install gulp ( You can build the project using it. 
I have installed gulp locally and globally so you are seeing CLI version and Local version. You may see only CLI version.

- npm install -g gulp

- Check the project structures.

Note :
Since the generator already run "npm install" and "bower install", so you can see the node_modules and bower_components folder with all the installed modules.
** npm will pick from package.json folder
** bower will pick from bower.json
** Any other modules need to be installed for your project then add them to respective package/bower json file and run npm/bower install.

Start the server using gulp. Tasks are present in gulpfile.js

- gulp serve 

** Server will be starting and listen at 9000 port. You can change the port in gulpfile.js file if you want.

No comments:

Post a Comment