Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move /app/mirage to /mirage #49

Closed
samselikoff opened this issue Mar 8, 2015 · 7 comments
Closed

Move /app/mirage to /mirage #49

samselikoff opened this issue Mar 8, 2015 · 7 comments

Comments

@samselikoff
Copy link
Collaborator

Is this possible?

@trabus
Copy link
Contributor

trabus commented Mar 16, 2015

As part of the config, there could be something like 'mirageRoot' or something like that where we would define the path to the mirage folder. For that matter, the fixtures and factories folder locations could be configurable (optionally of course) for different types of setups.

@g-cassie
Copy link
Contributor

g-cassie commented Jun 1, 2015

I think this would make it difficult to share mirage files across multiple ember addons. A lot of ember devs are making a "common" ember addon that holds their models and is a perfect place to define a mirage config. Then they have multiple apps which all use this addon allowing them to share common code.

@samselikoff
Copy link
Collaborator Author

Interesting point - but in that case, wouldn't it still be namespaced under your addon? i.e.

/your-addon/config.js

instead of

/your-addon/mirage/config.js

?

@g-cassie
Copy link
Contributor

g-cassie commented Jun 1, 2015

You can do either. Addons have two directories "addon" and "app". Files in "app" end up in the same namespace as the consuming application. Files in "addon" end up in the addon's namespace. Personally, I am defining all my factories in my common addon's "app/mirage/factories/" folder (would like to put routing config here as well but doesn't seem to work out of the box). Then in my consuming applications I can call factories without any changes.

@trabus
Copy link
Contributor

trabus commented Jun 1, 2015

I wonder if it's possible to treat the mirage directory the same as app where any code in any addon's mirage directory would get picked up and bundled together in my build.

I personally don't like having mirage code in my app folder, because it isn't part of my distributed app. I would prefer mirage code be organized separately.

@g-cassie
Copy link
Contributor

g-cassie commented Jun 1, 2015

Yeah could be a way forward - but can't quite wrap my head around how the dependency imports would work.

@samselikoff I just reread your comment and I think maybe I misunderstood your point...

@seawatts
Copy link
Contributor

seawatts commented Jun 1, 2015

I also like the way my app will auto reload because the app dir is being watched. More of a nice to have than anything =P

dschmidt added a commit to dschmidt/ember-cli-mirage that referenced this issue Oct 23, 2015
dschmidt added a commit to dschmidt/ember-cli-mirage that referenced this issue Oct 23, 2015
samselikoff added a commit that referenced this issue Oct 26, 2015
[Fix #49] Move `/app/mirage` to `/mirage`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants