producerphp / producer.producer

Tools for producing library packages.
MIT License
104 stars 6 forks source link

[Enh] configurable `src/` folder #7

Closed Faryshta closed 8 years ago

Faryshta commented 8 years ago

I think producer should read the composer.json file to readh the autoload property and use that to determine which folder(s) to use for executing phpDoc.

pmjones commented 8 years ago

/me nods

Reading "autoload" might be a bit tricky; I can see there maybe being more than one autoload entry. Perhaps instead, a "src" config directive in the .producer/config file?

Faryshta commented 8 years ago

but wouldn't that mean that you have to configure your project twice? one for composer and one for producer. I am ok with it but I don't see any advantage and probably will cause headaches when you update one file and forget to update another.

I can see there maybe being more than one autoload entry.

Yes, thats the point :smiley: right now if my project has two different folder being autoloaded producer has no way to determine them.

pmjones commented 8 years ago

right now if my project has two different folder being autoloaded producer has no way to determine them.

You're doing that yourself now? OK then. Send a PR for it, if you have the time and inclination, and I can review.

Faryshta commented 8 years ago

Cool let me dip into the code.

pmjones commented 8 years ago

On further consideration, given that "58% of packages include a src/ directory and 5% a lib/ one", I think making this configurable is not really necessary.