You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bit needs to define a main file for each component. This file is used as the entry point for the package.json it generates. There are few rules in place to define one of the files as the main file. If all rules fail, Bit prompt an error asking the user to define them with the --main flag.
Seeing that many projects use a convention where all the files of a component are in the same directory, Bit should support it and better detect main files. This is relevant when tracking a directory as a component, or all files in a directory as a single component.
[partent-dir-name].js|ts|tsx|vue
Some teams prefer the main file of a component to be the name of the component, meaning - the same name of the directory that the component is implemented. For example:
…ame name as its dir. also, extract the logic of finding the mainFile from bitMap class to a new file and reoranize the code to loop through the different strategies
… as its dir (#1860)
* implement #1714, auto recognize mainFile when a file added with the same name as its dir.
* extract the logic of finding the mainFile from bitMap class to a new file and reorganize the code to loop through the different strategies
@ranm8 , I verified that this was completed. The CHANGELOG file has this: - [#1714](https://github.com/teambit/bit/issues/1714) auto recognize mainFile when a file added with the same name as its dir
Bit needs to define a main file for each component. This file is used as the
entry point
for thepackage.json
it generates. There are few rules in place to define one of the files as the main file. If all rules fail, Bit prompt an error asking the user to define them with the--main
flag.Seeing that many projects use a convention where all the files of a component are in the same directory, Bit should support it and better detect main files. This is relevant when tracking a directory as a component, or all files in a directory as a single component.
[partent-dir-name].js|ts|tsx|vue
Some teams prefer the main file of a component to be the name of the component, meaning - the same name of the directory that the component is implemented. For example:
In this example, for the directory
button
, the main file isbutton.ts
.The text was updated successfully, but these errors were encountered: