Smart build

**not ready for merging yet**
another way to detect (and maybe better)

web/ : it's a web app
bin/ : it's a command-line or server app

looking at the top of the file might be tricky, because you're not taking into account transitive dependencies.