-
Notifications
You must be signed in to change notification settings - Fork 936
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
Suggested structure for component and its capsule. #2582
Comments
Just to make sure I understand correctly.
And @ranm8 @itaymendel @davidfirst @imsnif |
@GiladShoham - yes. this is the structure. |
I tend to agree, convince @ranm8 about it. |
Bit does not interfere with the |
@itaymendel - not main? not version? not types? not other entries (es2015)? not dependencies? You expect the user to provide everything including versions update? |
After a long discussion, we decided to change it to component.json. |
@GiladShoham , I just came across another use-case where having the source inside a directory "src" could help. Anyway, regardless, I tend to agree with the suggestion of having this src directory in the capsule. |
@davidfirst I understand how it might help for this, but I won't take it as a consideration when coming to decide about the structure. It's not a strong enough reason. just a side bonus |
@GiladShoham , that's correct, we're actually not going to write them both. The point is that we might find ourselves in a need for writing files that are not related to the source. |
I'm working on the
Another issue I'm having is when running @ranm8 , @GiladShoham , what do you think? |
… symlink this src directory to the workspace (as described in #2582)
To keep this issue up to date. I tried a POC in the branch above and it didn't work well. See more details in this comment: #2677 (comment). |
@davidfirst I believe we can close it already? please re-open if you think we need further discussion about it. |
The following is the structure suggested for a component that is built using a capsule. This format is applicable for folder-based components only (whole folder).
Inside the project - the component contains the source and dev files.
In addition - a bit.json (jsonc? same same) file may reside to include instructions for Bit. Pacakge.json cannot reside inside this folder, as it is a file generated by Bit.
When building the capsule the following format occurs:
The bit.json file inside the folder is copied to the root and can include instructions to bit on generating package.json(e.g. addition and removal of dependencies), tsconfig options, etc.
Although it is possible to write explicit instructions per component, the expectation is to have most of the configuration on the workspace level with overrides syntax and not on each component separately.
Benefits of storing source files in an src folder and not in capsule root:
The text was updated successfully, but these errors were encountered: