Questions tagged [yeoman]

Yeoman is a command-line tool for frontend web development. As a "web application boilerplate," its main features include project scaffolding, a build process based in part on Grunt.js, and package management for updating project dependencies.

Yeoman Features

  1. Scaffolding: Automates project structure using HTML5 Boilerplate, jQuery, and Modernizr - and optionally Compass, Twitter Bootstrap, RequireJS, and Twitter Bootstrap plugins.
  2. Watch Process: Integrates LiveReload with a native fallback watch process for updating changes in the browser without refreshing.
  3. Linting: Runs JSHint on specified project files during its build process.
  4. Preview Server: Using the grunt server command starts a built-in HTTP server for monitoring project changes auto-compiling CoffeeScript/Compass files.
  5. Image Optimization: Integrates OptiPNG and JPEGTran into the build process.
  6. Build Process: In addition to the features already mentioned, grunt build concatenates, minifies, and generates an application cache manifest. The build process also incorporates the RequireJS r.js optimization script.
  7. Package Management: Update project dependencies such as third-party libraries and extensions from the command line using Bower.
  8. Testing: Supports generating test cases for Mocha or Jasmine and automatically building them as part of the build process via Karma.

Yeoman Resources

  • Main Website - installation, CLI reference, package manager, metrics tool, FAQs
  • GitHub - project repository and additional README documentation
  • GitHub Issues - main support site for early release troubleshooting
  • Google Groups - mostly administrative issues with some support questions
  • Google Plus - promotional updates and links to media coverage
  • Twitter - support discussions and links to media coverage
2349 questions
40
votes
11 answers

How do unit test with angular-translate

I have uses angular translate from here (http://pascalprecht.github.io/angular-translate/) and it's just work fine, but it break my controller's unit test whith Error: Unexpected request: GET scripts/i18n/locale-en.json I don't understant why? I…
bin
  • 401
  • 1
  • 4
  • 4
39
votes
4 answers

generator-angular: task "karma" not found when calling `grunt test`

I'm trying to setup a development environment with Yeoman for AngularJS, I installed Yeoman according to the instructions: sudo npm install -g yo bower grunt-cli generator-angular and I'm generating a new app with yo angular. After the app is…
Gal Ben-Haim
  • 17,433
  • 22
  • 78
  • 131
39
votes
3 answers

What is workflow in Yeoman to work with Sass files?

I try to use yeoman but I don't know how to use my own sass files with it. With grunt server Sass files are watched and compiled into .tmp/styles/ But there is no reference to the compiled stylesheet, except
MarekLi
  • 941
  • 1
  • 12
  • 18
38
votes
3 answers

Is it possible to run Karma with no browsers at all?

I started an Angular.js app with Yeoman's yo angular that includes Karma testing. Then, the grunt test reasonably failed because Karma can't find any browsers. (The browsers has not been set in the app's node_modules/karma config file.) I'm doing my…
randwa1k
  • 1,502
  • 4
  • 19
  • 30
37
votes
4 answers

How to make travis execute Angular tests on Chrome ("Please set env variable CHROME_BIN")

I'm working on a sample Angular project generated by yeoman. I am able to run karma tests locally (I set system variable CHROME_BIN to point to chromium binary, but this could have been done in more elegant way. Just a quick work-around.) However,…
vucalur
  • 6,007
  • 3
  • 29
  • 46
36
votes
9 answers

How to fix "yo: command not found" after installing Yeoman

Following these instructions, I tried to install yeoman using npm twice: http://yeoman.io/learning/index.html After the first failure, I uninstalled node using these instructions: How do I completely uninstall Node.js, and reinstall from beginning…
Joanna Marsden
  • 545
  • 1
  • 4
  • 10
36
votes
4 answers

Why are my Yeoman generators installing in the wrong place?

I have a problem with Yeoman generators. They install just fine if I run "npm install [generator-name] -g". However when I try to run "yo [generator-name] yeoman can't seem to find the generator. Neither is it listed among my other generators if I…
anderssonma
  • 455
  • 1
  • 5
  • 11
34
votes
5 answers

Cannot find module 'karma' while using grunt

I am using Yeoman toolkit to bootstrap an Angular web application. I've followed all the steps mentioned here. But still, apparently, grunt can not find the karma module. It spits out this error: Loading "grunt-karma.js" tasks...ERROR >> Error:…
TeknasVaruas
  • 1,480
  • 3
  • 15
  • 28
33
votes
3 answers

Yeoman for Angular, then "grunt serve" won't start

This is the first time I use yeoman to setup the scaffolding for an AngularJS app, and I have to admit I am likely new to the nodeJS, grunt and bower world. So, here's what I've done so far: I made sure yeoman, grunt-cli and the angular-generator…
Alpha
  • 7,586
  • 8
  • 59
  • 92
32
votes
1 answer

Angular "Unknown Provider" error after minification with Grunt Build in Yeoman app

I'm having problems with grunt build on a Yeoman generated Angular app, using Coffee and Slim, with all libraries up-to-date. (The app was just generated a few days ago with the most recent generator.) grunt build and grunt server both worked fine…
javbotero
  • 423
  • 1
  • 4
  • 4
32
votes
5 answers

Can Yeoman generators update existing files?

So just to give you some context, I'm trying to create a generator that will create some files (based on user input of course) as well as update some existing files in the project (like adding a new route for example). Creating the files using…
Remy
  • 1,414
  • 4
  • 20
  • 29
32
votes
4 answers

How to run grunt server in dist directory instead of app directory?

After grunt building my AngularJS app to my dist directory, I would like to test it out with grunt server. Problem is that grunt server just serves up all the code in my app/ directory. Additionally, keep in mind that I created my app with yo…
user883807
32
votes
4 answers

How can I automate both E2E and unit tests with Yeoman & AngularJS?

I'm using Yeoman and generator-angular to manage AngularJS apps, but I'm having trouble with automated testing. Running grunt test will run unit tests once. I can get E2E tests to run after unit tests by altering the karma config block in…
Jamie Schembri
  • 6,047
  • 4
  • 25
  • 37
32
votes
2 answers

Yeoman Workflow and Integration with Backend Scripts

So, I've been anticipating Yeoman and it's already out for a week or so now. But after successfully installing it, I've been confused at the workflow and the implementation with backend script (API). Scenario 1 So let's say I don't need all those…
Henson
  • 5,563
  • 12
  • 46
  • 60
31
votes
3 answers

How do I fix my generator-angular project so that grunt test works?

I am working off of this tutorial: http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/ as a means to understand what files are created using yo generator-angular. I have experience using AngularJS, but was…
user2464083
  • 1,324
  • 2
  • 11
  • 18