Search code examples
ember.jsember-cli

Ember CLI with pod syntax


According the Ember CLI documentation, pods are supported out the box. Github issue #142 says generators should "just work" with pods. This answer suggests it should just work too. However, when I try ember generate model XXX, it generates /models/XXX.js, instead of /pods/XXX/model.js.

Again, per the documentation, I added podModulePrefix to my app.js file:

var App = Ember.Application.extend({ modulePrefix: 'app', podModulePrefix: 'app/pods', Resolver: Resolver });

If I manually create files using pod syntax, the resolver picks it up, so I know the app is configured properly, but I do not know what I need to do to get Ember CLI generators to respect pod syntax. Am I missing something?


Solution

  • CHANGED: Sept 24, '14 This merge request was recently pulled in: https://github.com/stefanpenner/ember-cli/pull/1994 which will add the flag --pod to ember-cli generators.

    Don't forget to add podModulePrefix as per the current ember-cli docs.


    OLD: Currently pods are not supported in ember-cli blueprints. It is a feature still in dev, here is the discussion: https://github.com/stefanpenner/ember-cli/issues/1619