-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Can you provide a way to customise the way a component name is implied from the file name?
I'm having an Angular project in which I'd like to use your plugin. In Angular it's recommended to name the stylesheet for SomeThing component some-thing.component.scss.
This plugin then throws an error Invalid component name from implicit conversion from filename (...)/src/app/shared/some-thing/some-thing.component.scss. I assume the problem is that after removing the extension .scss the plugin is left with some-thing.component which has dot in it, which it doesn't know how to handle.
- An easy way to fix that would be to add a configuration option, which would specify a suffix added to component files. E.g.:
implicitComponentsSuffix: '.component' - More flexible solution would be to use a regular expression, which would define how component name is found in the file name (with extension removed). The capture group in that regular expression extracts the component name. E.g.:
implicitComponentsNameExtract: /^(.+)\.component$/
Is there a chance to provide an option to configure that?
alexgitcher, herteleo and joepagan
Metadata
Metadata
Assignees
Labels
No labels