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

Change default folder for certain items #1814

Closed
maddijoyce opened this Issue Aug 29, 2014 · 6 comments

Comments

Projects
None yet
3 participants
@maddijoyce
Copy link

maddijoyce commented Aug 29, 2014

Hey,

I guess this is more a feature request than anything else, and I'm not sure if there's any way of doing it, but I'm looking to use a different folder location for certain items, e.g. models go in ../shared/models.

I've got 2 projects that use the same API and I'm basically having to copy and paste my model, serializer and adapter files between the 2 projects. I'd like to have a ../shared/ folder that contains these models, serializers and adapters that I can then point ember-cli to.

Currently, I've tried using symbolic links but it seems that broccoli struggles to deal with symbolic links. Is there a way to change the default name, or import extra models from a different folder.

@rwjblue

This comment has been minimized.

Copy link
Contributor

rwjblue commented Aug 29, 2014

Sounds like a great thing for an addon. The addon can be that shared code between your applications. This will work perfectly today, without any special modifications.

@rwjblue

This comment has been minimized.

Copy link
Contributor

rwjblue commented Aug 29, 2014

The addon would just have a app/ tree with the adapter/, serializer/, and models/ files/folders. Once included in the two projects, those pieces would all be "magically" merged into the running application just as if you had authored them there directly.

@maddijoyce

This comment has been minimized.

Copy link
Author

maddijoyce commented Aug 29, 2014

Hmmm, I hadn't looked into ember addons before. Excellent! Thanks.

@maddijoyce maddijoyce closed this Aug 29, 2014

@maddijoyce

This comment has been minimized.

Copy link
Author

maddijoyce commented Aug 29, 2014

Just finished creating the addon and it works perfectly. Have even been able to pull out the bower modules that both apps use. Thanks heaps.

@jakecraige

This comment has been minimized.

Copy link
Member

jakecraige commented Aug 29, 2014

💯

@maddijoyce

This comment has been minimized.

Copy link
Author

maddijoyce commented Sep 5, 2014

If anyone comes here and is a little confused, I followed this process: http://maddijoyce.com/programming/ember/2014/09/05/an-exploration-in-ember/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.