simonblee / generator-maryo

Yeoman generator for Backbone and Marionette.
MIT License
43 stars 11 forks source link

Namespacing? #16

Open shaekuronen opened 10 years ago

shaekuronen commented 10 years ago

Hmm, first go of it, I'm not really seeing how namespacing works, especially if using Generator Backbone for models, views etc. With Generator Backbone I get a collection like

/*global generatorMaryo, Backbone*/

generatorMaryo.Collections = generatorMaryo.Collections || {};

(function () {
    'use strict';

    generatorMaryo.Collections.CollectionTestCollection = Backbone.Collection.extend({

        model: generatorMaryo.Models.CollectionTestModel

    });

})();

while with Maryo I get a collection view

define([
    'marionette'
],

function (Marionette) {

    return Marionette.CollectionView.extend({

        itemView: item_view_test,

        events: {},

        initialize: function () {}

    });
});

Are there any docs that provide a primer for this? Thanks!

simonblee commented 10 years ago

Hi @shaekuronen, I'll add a gist shortly to show you how I get things working.