Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS + RequireJS + Bower + Karma + Yeoman + Node

I'm building a app for learning, and I have these major components. My first question is if these parts are a good foundation for an angularJS app. I've read in some cases that RequireJS is not a good idea, but not sure why.

My goal is to have a dev environment set up where I have unit and e2e tests, and I want to have this in place before I start coding.

I'm having trouble getting these pieces to work together, and as I push through the issues I thought I'd ask what the latest best practice is to build a non trivial angularJS app.

like image 533
bmw0128 Avatar asked Nov 21 '13 17:11

bmw0128


2 Answers

I have a project that uses AngularJS + RequireJS + Bower + Karma in Github that you can take a look:

http://marcoslin.github.io/angularAMD/

For me, RequireJS has worked very nicely with AngularJS and together it helped tremendously in both application load time and code organisation. I do not use Yeoman yet but Grunt and Bower serve as key foundation for dependency sourcing and building of final project. Karma is a must for unit testing. You should be able see all these components working together in angularAMD Github project.

like image 73
marcoseu Avatar answered Oct 18 '22 18:10

marcoseu


Your question is a little vague, and answers will be mostly opinions. Anyway, here's mine… You definitely need node to run all the modern javascript web development tools. (grunt, yeoman, karma, mocha, jshint, uglify, coffee, etc, etc.) Bower is nice to have for updating your client packages. RequireJS is useful for module loading, but not necessary. It should work with AngularJS, but keep in mind that the angular "modules" are completely different from RequireJS "modules". If I were you, I'd work through the Angular tutorial to get a good understanding. Then start your project with yeoman: yo angular.

like image 22
gstroup Avatar answered Oct 18 '22 18:10

gstroup