abiee / generator-backbone-amd Goto Github PK
View Code? Open in Web Editor NEWYeoman generator for Backbone with AMD capabilities
Yeoman generator for Backbone with AMD capabilities
Generation fails with this error message:
You don't seem to have a generator with the name buster:app installed.
node 0.10.4
yo 1.0.0-beta.4
If you want to create a collection and a model on one step with coffee flag, model is not generated as CoffeeScript
After building my app and attempting to run it, I get Uncaught Error: Mismatched anonymous define() module
I am assuming this is because the js files are simply minified and added to a single file, instead of being optimized according to RequiereJS standards using r.js as discussed here: http://requirejs.org/docs/optimization.html .
How can this be integrated into the generator? I am assuming this can be done easily by modifying the grunt file.
Here is the gist with the output/error message. Any ideas?
/Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/lib/actions/actions.js:186
throw new Error('Unable to read "' + filepath + '" file (Error code: ' + e
^
Error: Unable to read "/Users/senei/node_modules/generator-backbone-amd/templates/javascript/requirejs_app.coffee" file (Error code: ENOENT).
at Appgenerator.read (/Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/lib/actions/actions.js:186:11)
at Appgenerator.mainJS (/Users/senei/node_modules/generator-backbone-amd/app/index.js:227:37)
at /Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/lib/base.js:290:20
at /Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/node_modules/async/lib/async.js:548:21
at /Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/node_modules/async/lib/async.js:224:13
at iterate (/Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/node_modules/async/lib/async.js:131:13)
at /Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/node_modules/async/lib/async.js:142:25
at /Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/node_modules/async/lib/async.js:226:17
at /Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/node_modules/async/lib/async.js:553:34
at /Users/senei/node_modules/generator-backbone-amd/node_modules/yeoman-generator/lib/base.js:278:11
I am having:
yo -v
1.0.4
With
yo backbone-amd testapp
Results in:
reqjs/generator-backbone-amd/app/index.js:37 '\n `---------´ | '+'Welcome to Yeoman,'.yellow.bold+' |' + ^ TypeError: Cannot read property 'bold' of undefined
Apparently other projects suffered from that too.
On view creation template is not created
Activating coffeescript via yo backbone-amd
fails, but yo backbone-amd --coffee
works. Seems like there's a miscommunication between the usage of this.options.coffee
and this.coffee
in index.js
.
i want to install generator-backbone-amd to be able to use it globally in all of my projects using
npm install https://github.com/abiee/generator-backbone-amd.git
always give me error
npm ERR! not a package /var/folders/36/2gh_krfx4wn3hnpc9ml0k45w0000gn/T/npm-87281/1364858059325-0.6085865686181933/tmp.tgz
npm ERR! Error: ENOENT, open '/var/folders/36/2gh_krfx4wn3hnpc9ml0k45w0000gn/T/npm-87281/1364858059325-0.6085865686181933/package/package.json'
and I don't want it to use npm link as it will only available in current project and I will have extra folder generator-backbone-amd in every project structure
The included .jhintrc overrides my sublimelinter settings and causes a few exceptions like undefined globals. I would like it to keep my sublime text 2 settings for jshint.
I understand that the generated modules of models/views/collection all define the main App object, but what in requirejs actually loads the individual modules, since they aren't called anywhere.
App = {
init: function () {
// initialize router, views, data and layouts
},
start: function () {
App.init();
Backbone.history.start();
},
Views: {},
Models: {},
Collections: {},
Routers: {},
Events: {},
windowWidth: null,
windowHeight: null
}
The individual modules for models/views/containers define themselves like App.Views.View = foo
.
But what actually executes those individual modules, since right now the object properties are undefined, as if those models are never required or called anywhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.