Feature request: make *client*.js files run on client, *server*.js files on server

I have this file structure:

myapp/
  _app/
    client/
    server/
    mutual/
  private/
    app/
      feature1/
      feature2/
      feature3/

I write application in private/app. Every time I change files in private/app directory, my smart package “compiles” them to _app directory. _app directory is excluded from my code editor so I even don’t see it, but Meteor reads files from _app.

How it works:
I wrote build package (build package is something that do preprocess on your files, like coffeescript smart package). This package reads all files in private/app directory and moves them to _app directory to client, server or mutual folder (according to some filename rules).

P.S. you can achieve the same effect by using grunt, gulp or another build tools.

1 Like

I think it’s not manageable ATM to do big projects with meteor without putting everything in packages.
As you probably know when your code is in package, you can choose (without folders :wink: )which code goes on the client, on the server or on both (even mobile…).
That way you have seperation of concern without client/server folders.

1 Like