Improvement idea: flexibility in folder structure
jamauro opened this issue · 3 comments
If I'm understanding correctly, methods and publications must be created inside a methods
folder and publications
folder respectively for this package to work. Let me know if I'm wrong. It would be nice if this structure wasn't imposed.
Btw, apologies for creating all these issues. I figured it would be easier to create them one by one rather than one big issue. Appreciate the work you've done here!
Thanks for creating these issues. Keeping them separate is easier.
The files with methods and publications are treated very differently on the client compared to a normal file in a Meteor app. The restriction on the folder structure is to make it very clear while files will be kept as is on the client and which ones zodern:relay will completely rewrite. I am open to other ways to achieve this, but I think it is important to have this distinction between the types of files.
I see. One idea would be to also support files methods.js
and publications.js
in addition to the folders. This would align with the Meteor Guide's example app structure and allow for a little more flexibility. I'm not sure if there are downsides to that though.
This is the biggest negative of this package for me. As @jamauro mentioned, the recommended Meteor folder structure groups files by module, also when using the "meteor generate" command this is the way files are created. So either the default recommended folder structure should change, or this package should be adapted to support it.