-
Notifications
You must be signed in to change notification settings - Fork 440
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
Comments
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. |
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. |
Interesting point - but in that case, wouldn't it still be namespaced under your addon? i.e.
instead of
? |
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. |
I wonder if it's possible to treat the 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. |
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... |
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 |
[Fix #49] Move `/app/mirage` to `/mirage`
Is this possible?
The text was updated successfully, but these errors were encountered: