Ember CLI with pod syntax

According to the Ember CLI documentation , containers are supported in the box. Github issue # 142 says that generators should β€œjust work” with containers. This answer suggests that it should just work. However, when I try ember generate model XXX, it generates /models/XXX.jsinstead /pods/XXX/model.js.

Again, for the documentation , I added podModulePrefixto my file app.js:

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

If I manually create files using pod syntax, this recognizer selects it, so I know that the application is configured correctly, but I do not know what I need to do to make Ember CLI generators respect pod syntax. Did I miss something?

+4
source share
3 answers

CHANGED: September 24, 14 This merge request was recently used: https://github.com/stefanpenner/ember-cli/pull/1994 , which will add a flag --podto ember-cli-generators.

Remember to add ember-clipodModulePrefix according to your current docs .


OLD: Pods are currently not supported in ember-cli drawings. This is another dev feature, here is a discussion: https://github.com/stefanpenner/ember-cli/issues/1619

+3
source

, , ( 1.13.8), .ember-cli

"usePods":true

. , --pods p . .ember-cli JSON, , , :

{
    "usePods": true
}
+2

ember-cli 0.1.5, --pod:

ember g <blueprint> <name> -p

Pods , , ( mixin, util, service ), pod , generate ( ).

It should also be noted that app/containers can also be created in the folder and do this when podModulePrefixnot. In fact, it podModulePrefixwill become obsolete with ember-cli 0.2.1, and you will need to move any pods from app/podsto app/.

+1
source

All Articles