iron-meteor / iron-cli

A scaffolding command line tool for Meteor applications.
639 stars 82 forks source link

Enhanced project structure #51

Closed cmather closed 9 years ago

cmather commented 10 years ago

cc @scott-mcpherson.

I'm playing with a slightly new project structure where config stuff isn't in the app directory. It looks like this:

app/
  - both/
  - client/
  - packages/
  - public/
  - server/
config/
  - development/
    - env.sh
    - settings.json
start.sh (auto source the env.sh, cd into the app, and start it with the right settings file)
scottmcpherson commented 10 years ago

Nice. I have to ask this question. What is the env.sh file for that em is creating? Some type of executable or environment variables? @cmather

lirbank commented 9 years ago

@cmather - why /app/lib/ ? I kind of liked both, it is quite a descriptive of what it holds.

Also at risk of creating confusion since /app/server/lib and /app/client/lib are special and are loaded first, but /app/lib is just a regular folder that will be loaded on both sides.

cmather commented 9 years ago

I think the root lib folder is loaded before other things as well isn't it? Although the client/lib and server/lib folders may load first since they're further down the hierarchy. But the reason for 'lib' instead of 'both' is that 'lib' does have special meaning in meteor (i.e. it's loaded before other things) as where 'both' doesn't.

But I actually prefer 'both' as well. The issue is that it was just loaded first because of the alphabetical sorting.

lirbank commented 9 years ago

You are right, lib is loaded first also in the root!

Hmm, more predictable to use /lib and more clear to use /both

Closing this.

close

On Friday, February 13, 2015, Chris Mather <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I think the root lib folder is loaded before other things as well isn't it? Although the client/lib and server/lib folders may load first since they're further down the hierarchy. But the reason for 'lib' instead of 'both' is that 'lib' does have special meaning in meteor (i.e. it's loaded before other things) as where 'both' doesn't.

But I actually prefer 'both' as well. The issue is that it was just loaded first because of the alphabetical sorting.

— Reply to this email directly or view it on GitHub https://github.com/iron-meteor/iron-cli/issues/51#issuecomment-74355238.

@MikaelLirbank https://twitter.com/MikaelLirbank of Airlab http://airlab.io/

cmather commented 9 years ago

I think two mdg core changes would make this a lot nicer:

1) Allow module includes like we have in node (require files as we choose) 2) js preprocessing script that let's us define server/client code in one file but only ship client code to the client. I think it's easier than having multiple folders.