I added a file with the .module.css ending. bit did not recognize it as a valid file ending and added it to the module to the component name.
component.module.csscomponentmodulebit should recognize that the .module part is not a part of the name.
even if bit doesn't recognize it, it should at least be replaced with -.
Thanks @odedre for reporting this.
@Tallyb , @itaymendel , what do you suggest the best experience here?
As described, If I run bit add component.module.css, the component name is componentmodule.
According to the code, we replace camelCase with a dash but remove all dots. I guess we should also replace dots with dashes.
For a future reference, this is coming from the following function:
static getValidIdChunk(chunk: string): string {
if (!isValidIdChunk(chunk)) {
chunk = chunk.replace(/\./g, '');
chunk = decamelize(chunk, '-');
}
return chunk;
}
I agree it should replace dots with dashes.
@davidfirst @GiladShoham - this is not a common scenario (adding only module.css file to component). I suggest to freeze it.
Most helpful comment
@davidfirst @GiladShoham - this is not a common scenario (adding only module.css file to component). I suggest to freeze it.