Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a .klingon.json that will hold upcoming configurations #68

Open
sumitparakh opened this issue Nov 3, 2018 · 5 comments
Open

Comments

@sumitparakh
Copy link
Member

No description provided.

@sumitparakh
Copy link
Member Author

Hi @manekinekko . Please suggest what kind of configuration options would this file contain? Any basic ones would you recommend?

@sumitparakh sumitparakh mentioned this issue Nov 3, 2018
30 tasks
@manekinekko
Copy link
Member

Well basically, anything needed by Klingon. There is no fixed list for now. But, I was thinking about having something similar to angular.json. A per-project config file that will hold klingon specific config. What do you suggest?

@sumitparakh
Copy link
Member Author

Well basically, anything needed by Klingon. There is no fixed list for now. But, I was thinking about having something similar to angular.json. A per-project config file that will hold klingon specific config. What do you suggest?

I was thinking the same but in a bit centralized manner. My idea is to have a single klingon.json file in the root folder of main project. A command woud be run before each npm start which will check for updated config and create/update config files in respective packages, i.e., inside packages/<project> .

After that, each project can handle their configs accordingly, as we code them to do.

I've made a small pictorial presentation of it:-

config

In above image, klingon.json would contain top level keys of every lerna package (if there is any). For ex. if there are 2 packages as k-app and k-ui , then klingon.json would be as follows:-

{ "k-app": { }, "k-ui": { } }

Based on these key names, our node js code will validate packages. So we won't need to go through config files in each project to update anything. We can just do it from one main json file and our nodejs program will do the rest.

What say @manekinekko ?

@manekinekko
Copy link
Member

manekinekko commented Nov 14, 2018

A command woud be run before each npm start which will check for updated config and create/update config files in respective packages, i.e., inside packages/$project.

What would be the reason for having different files under inside packages/$project? We could just centralize all the config under klingon.json at the root, as you mentionned. Is their any technical limitations to this?

@sumitparakh
Copy link
Member Author

sumitparakh commented Nov 14, 2018

A command woud be run before each npm start which will check for updated config and create/update config files in respective packages, i.e., inside packages/ .

What would be the reason for having different files? We could just centralize all the config under klingon.json. Right?

Ok. If we keep only one config file then how can we independently access it in production build of each project? Because each package in itself is a project. So if i publish klingon electron app and run it separately, then how will i access config file if it's not available in the root folder of klingon-app project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants