Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Entry-points files in separate folders #85

Closed
smontlouis opened this issue Sep 13, 2015 · 3 comments
Closed

Entry-points files in separate folders #85

smontlouis opened this issue Sep 13, 2015 · 3 comments

Comments

@smontlouis
Copy link
Contributor

It seems more logical to me to put

  • client/entry-points/client.js in client/main.js
  • client/entry-points/server.js in server/main.js

What do you think ?

Btw, I made some folder restructuration (just for my own little project) because I prefer to work by modules/features, but this is purely opiniated. You can take a look here if you want.

I give you an example.
For a todo feature we have :

  • todo.react.js (to differanciate with todo.js which is a model if necessary)
  • todo.page.js (when in todo is a page in route handler)
  • todo.js (model)
  • todo.spec.js
  • todo.scss
  • reducer.js
  • actions.js

Voilà.

@dvdzkwsk
Copy link
Owner

I can see the confusion with the server entry point being in client. It used to make more sense back when client was named src, which I think would be the best option should it be renamed. I'm not too keen on putting it in server, since it truly has nothing to do with the server, it's just the client application bundled in a way that the server can use it (this has to be done for non-js asset support).

As far as the internal structure, I'm probably going to leave it as is (in terms of feature vs. type), just because the starter kit is already fairly simple and people are free to make changes as it suits them, as you have done. I'm definitely open to reconsidering the name client in favor of src, however, if you want to provide your thoughts on that.

Edit: It was renamed from src to client back when the official Redux universal example was renamed. However, I think src may be more appropriate for this starter kit since it's not built to be a "true" universal/isomorphic application. It supports server side rendering, but that's different from the server working directly from the application source code. See #61 for more on this.

@smontlouis
Copy link
Contributor Author

+1

@dvdzkwsk
Copy link
Owner

Renamed in #86.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants