NEEOInc / neeo-sdk

NEEO Brain SDK
https://neeoinc.github.io/neeo-sdk/
MIT License
49 stars 17 forks source link

NeeoSdkOption should not be a part of package.json #105

Closed alxbauer closed 6 years ago

alxbauer commented 6 years ago

In my opinion the package.json is not a good place for configuration options. The package.json is normaly part of the source and will be updated from time to time, so it should not contain user specific options. I would prefer a separate configuration file, e.g. neeo-sdk.json or something like that.

pfiaux commented 6 years ago

Hi thanks for the feedback,

We recently had several discussions (#74, #82, #100) about the structure of the code using the SDK. The recommended setup is now to install drivers via NPM, this means they are now isolated and have their own package.json separate from the "server" package.json.

Since the neeoSdkOption is only used at the top level there is a separation between the driver source and the server/client:

I believe this addresses the separation of user settings/code and driver source code. Also the new CLI (https://github.com/NEEOInc/neeo-sdk-toolkit/tree/master/cli) supports env variables as an alternative to package.json settings.

alxbauer commented 6 years ago

Thank you for the detailed answer. I understand the concept. I will adapt my code to and test it.