radiegtya / meteoris2

a Realtime Javascript Boilerplate base on Meteor Js Framework
MIT License
246 stars 45 forks source link

mugen and "my app" should be very clearly separated in directory structure #29

Closed ssteinerx closed 9 years ago

ssteinerx commented 9 years ago

To use Meteoris in a real project is very difficult for one major reason:

Meteoris, mugen, and all the support files are mixed in with the application's files.

In my opinion, all of the base Meteoris code should be in its own, root level subdirectory with all of the "application" code for a particular application in a completely separate, root level directory.

Since Meteor works based on directory names, the correct server, client, and both code will all end up in the same place, but one could merge from the upstream Meteoris project without worrying about overwriting anything in the "application" based on Meteoris.

Alternatively, and ultimately better, Meteoris could be an installable package and, thus, stay completely out of the application's code space.

radiegtya commented 9 years ago

Yeah it will be good if meteoris would be an installable as atmosphere package. But honestly I found many difficulty about creating own package in meteor. I also still doesn't have any time to do that. Anyone help would be appreciated.

FYI, mugen directory are constantly on the same place, here are the mugen location:

Thanks for the simple but brilliant idea @ssteinerx

ssteinerx commented 9 years ago

Why not just flip that over so that everything's in a mugen/xxxxx structure? Meteor doesn't care where in the heirarchy 'client', 'lib', 'private', and 'server' are. Then mugen could be checked out as a sub-project, with the demo stuff in a completely separate tree i.e. maindir/mugen, maindir/demo, and the app could be in maindir/app -- complete separation without even very much work.

ssteinerx commented 9 years ago

I am working on a branch in my fork to implement this. Please nobody touch directory structure stuff until my pull request is in (working on it right now, done tonight or tomorrow).

ssteinerx commented 9 years ago

Ok, done. This is not a complete migration, but accomplishes the major goal of moving mugen out of the application's directory tree. Making pull request now.

radiegtya commented 9 years ago

Hi @ssteinerx are You sure it works? Meteor need that client, lib, private and server folder. If mugen were going out from them, they will not detected as it should be, and will produce error.

I think the best way is make them as meteor package for atmosphere.

ssteinerx commented 9 years ago

I'd suggest pulling into a branch and let's get everything tested out. All the other folders are the same, only the mugen stuff has been pulled over. Meteor doesn't care where 'client', 'lib' etc. live, only 'private' has to be at the top level.

radiegtya commented 9 years ago

All bug from flip had been fixed in the master branch. Please try. I'll close this for now. Reopen if needed

ssteinerx commented 9 years ago

Yes, I added a comma in an attempt to get a 'private' file to compile. Fixed in my branch, I see you found the same thing.