Getting started with Yeoman and Backbone - backbone.js

I would like to use Yeoman and build a Backbone + Marionette + RequireJS project.
What are the things to consider and what are the actual commands I should run inorder to get things up and running.

Currently yeoman doesn't have official marionette generator - issue.
But you can try to modify Backbone.js generator for your needs.
Also you can check Yeoman generator for Express, Marionette and Backbone with AMD

There is a backend agnostic yeoman generator for the client aspect of a Backbone Marionette app called generator-maryo.

Related

AngularJS Upgrade to Angular Hybrid with Grunt/Bower

I have an older project that we want to add some more functionality to. It's a fairly big project so rewriting it is out of the question. I've been reading and following the Angular ngUpgrade guide to make the transition to be able to write Angular 2+ code and run it with my AngularJS application.
However, there are some things that I'm missing and I'm quite confused on what I need to do.
My team created the initial project using Grunt and Bower, looks like through a Yeoman generator. I've been following along in the PhoneCat Upgrade Tutorial and I'm at the part where it says to "Install Angular into the project, along with the SystemJS module loader."
At this point I've looked into SystemJS a bit and what we have with our Bower/Grunt setup but am fairly confused.
So my question is, do I need to change my AngularJS application to use SystemJS before continuing with the Angular Upgrade, or can Grunt and SystemJS work together in some way?

how to run yeoman generator-angular commands in Ionic app

I am lookig on generator-angular powered by yeoman ,It generate not only an angular base app but also other things like routes controller filter directive etc with the help of sub generator.
I am making an Ionic app ,As I know Ionic is based on Angularjs ,so while developping it I have to create routes ,controller and other stuff manually.
There is a Ionic Framework generator which genrate a Ionic base project but It does not create angular specific task like controller and routes .
Is there any way we can do that in ionic.
Thanks
The Angular Generator (npm install generator-angular -g) seems to be able to scaffold into an ionic app, but it puts the files in the wrong place. Default ionic apps put everything into www/. All of the generators expect things to be in app/.
The Ionic Framework Generator you refer to sets things up to use app/, and the angular generator seems to work ok with it.

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.
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.
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.

Yeoman use Backbone/Ember with requireJs

I would like to use Yeoman to start a project with a framework and requireJs enabled.
If I init a project with Amd and install backbone after, the models/controllers/routes... aren't generated with requireJs.
I have find this topic :
Howto bootstrap Backbone app with yeoman having require.js enabled
But the link of the response is dead... :(
If it helps in any way, I ported over the Peepcode Backbone project to a RequireJS and Yeoman-enabled one here: https://github.com/vishvish/backbone-peepcode-reboot
Yeoman has just changed its MO, and I don't know if that will work with it, but the models, routes, etc, are all there in RequireJS format, hopefully that will help you be on your way.
We have updated the Yeoman backbone generator to support both twitter bootstrap and RequireJS. But it not officially added to npm. But you can try it using
npm install git://github.com/yeoman/generator-backbone.git
Discussion : Not found in npm install

Howto bootstrap Backbone app with yeoman having require.js enabled

I'm playing with yeoman for a time now. I wonder how I accomplish bootstrapping a Backbone application and having require.js enabled at the same time.
yeoman init
provides me with a setup where I can work with modules in AMD style.
yeoman init backbone:all
provides me with a Backbone scaffold but I had to "include" all my models, collection etc. manually in index.html.
Is there a way to have both?
Regards Felix
We have updated the Yeoman backbone generator to support RequireJS. But it not officially added to npm. But you can try it using
npm install git://github.com/yeoman/generator-backbone.git
Discussion : Not found in npm install
The backbone generator supports yeoman 1.0beta. Try
yo backbone
You will receive a conditional prompt for RequireJS.
UPDATE 1
Backbone generartor is available on npm.
Try npm install generator-backbone
UPDATE 2
RequireJS with --coffee option is now supported in backbone generator v0.2.2
There's already an open issue for this. Add your thoughts there :)
Hi I developed a generator for that, take a look at https://github.com/abiee/generator-backbone-amd
I was trying the same today. What I did ultimately was to perform yeoman init first. Then again yeoman install backbone. Console will ask if you want to override files. Do not override main.js & index.html. Rest you may.
This won't give you perfect start. But, most of the things will be in place.

Resources