Reputation: 1602
What steps do I need to do in order to add a new dependency library to my Yeoman project. For example, what if I wanted to add Sammy.js or AngularUI. I don't see a generator for either of those so I would have to manually add them. But what other files do I need to edit so the project builds and runs correctly?
Below are some of the generators I searched for
npm search yeoman-generator | grep sammy
npm search yeoman-generator | grep angular-ui
npm search yeoman-generator | grep angularui
Upvotes: 9
Views: 7400
Reputation: 5897
You want to install things like Angular UI using Bower which is part of the Yeoman workflow along with Grunt.
Both of those packages do exist in the Bower registry:
$ bower search sammy
Search results:
sammy git://github.com/quirkey/sammy.git
$ bower search angular-ui
Search results:
angular-ui git://github.com/angular-ui/angular-ui.git
angular-ui-bootstrap-bower git://github.com/angular-ui/bootstrap-bower
angular-ui-bootstrap git://github.com/angular-ui/bootstrap.git
angular-ui-router git://github.com/angular-ui/ui-router
angular-ui-utils git://github.com/angular-ui/ui-utils.git
angular-ui-select2 git://github.com/angular-ui/ui-select2.git
angular-ui-date git://github.com/angular-ui/ui-date.git
angular-ui-calendar git://github.com/angular-ui/ui-calendar.git
angular-ui-codemirror git://github.com/angular-ui/ui-codemirror.git
angular-ui-ace git://github.com/angular-ui/ui-ace.git
angular-ui-multi-sortable git://github.com/mostr/angular-ui-multi-sortable.git
angular-ui-map git://github.com/angular-ui/ui-map.git
There's actually a quick example on the 'Getting Started' page linked above, on using Yeoman, Bower and Grunt to scaffold out an Angular project using AngularUI. Including it here for convenience:
yo angular
bower install angular-ui
# then add <script src="components/angular-ui/build/angular-ui.js"></script>
# and <link rel="stylesheet" href="components/angular-ui/build/angular-ui.css"/>
grunt
Upvotes: 10