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
You can install Yeoman generators using the npm command and there are over 3500+ generators now available, many of which have been written by the open-source community. This will start to install the Node packages required for the generator.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With