We are using yeoman for our angularjs app. For installing yeoman and its dependencies please follow Step 1 to Step 5 of this url http://yeoman.io/codelab/setup.html ( You can also install yeoman using following step1- step5.
For our app you need to install yeoman before you use grunt build. For installing yeoman follow these steps.
Step 1 : Before installing yeoman you need to install these dependencies.
- Node.js v0.10.x+
- npm (which comes bundled with Node) v2.1.0+
You can check if you have Node and npm installed by typing:
node –version && npm –version
You can check if you have Git installed by typing:
Step 2 : Install the Yeoman toolset by following command
npm install –global yo bower grunt-cli
This is the tutorial url
Step 3 : Once you installed all of the above It is a good idea to check that everything is installed as expected by running commonly used Yeoman commands like yo, bower, and grunt with the –version flag as follows:
yo –version && bower –version && grunt –version
Running the above should output three separate version numbers:
- Grunt CLI (the command-line interface for Grunt)
Step 4 : Install an AngularJS generator
Install generator-angular using this command:
npm install –global [email protected]9.2
Step 5 : Create a mytodo folder for all your codelab work:
mkdir mytodo && cd mytodo
Step 6 : Access generators via the Yeoman menu
Run yo again to see your generators:
Use generators directly
As you become more familiar with yo, you can run generators directly without the use of the interactive menu, like so:
Once You have a working yeoman project. You can check this using this command (grunt serve ) follow these steps for using grunt build our app.
Step 1 : Delete all file inside app folder and put all files from out bitbucket repo.
Step 2 : Replace Gruntfile.js (in the root directory ) with this https://drive.google.com/file/d/0B52L1WGHoo6jODA2bFNISldlN0U/view
Step 3 : Go to root directory (inside mytodo folder ) via command line and run this command grunt build
Step 4 : Enter recent commit no (commit no from bitbucket)
Step 5 : It will take few minutes for this process, once its complete you will see this message “Done, without errors.”
Step 6 : You can see a dist folder inside root directory. This folder contains all files with new version number.
Step 7 : Upload this folder to S3 production/integration bucket ( For uploading follow the steps in deployment docs).