File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
tools/create-element/generator Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ const getComponentAbsPath =
111111 * If no scope is provided, returns the empty string.
112112 */
113113const normalizeScope = ( scope : string ) : string =>
114- scope ? `@${ scope . replace ( / ^ ( @ + ) ( . * ) \/ $ / , '$2' ) } /` : '' ;
114+ scope ? `@${ scope . replace ( / ^ ( @ + ) ( [ - . \w ] + ) \/ ? $ / , '$2' ) } /` : '' ;
115115
116116/** Get template interpolation data from options */
117117const getInterpolations =
@@ -121,7 +121,7 @@ const getInterpolations =
121121 const className = Case . pascal ( options . tagName ) ;
122122 const readmeName = Case . title ( options . tagName . replace ( / ^ \w + - ( .* ) / , '$1' ) ) ;
123123 const scope = ! options . scope ? '' : normalizeScope ( options . scope ) ;
124- const packageName = `${ scope } ${ tagName } ` . replace ( / ^ @ + / , '@' ) ;
124+ const packageName = `${ scope } ${ tagName } ` ;
125125 return {
126126 className,
127127 cssName,
You can’t perform that action at this time.
0 commit comments