@@ -61,8 +61,7 @@ class TemplatesWorker {
61
61
62
62
cropExtension = ( path ) =>
63
63
this . config . templateExtensions . reduce (
64
- ( path , ext ) =>
65
- lodash . endsWith ( path , ext ) ? path . replace ( ext , "" ) : path ,
64
+ ( path , ext ) => ( path . endsWith ( ext ) ? path . replace ( ext , "" ) : path ) ,
66
65
path ,
67
66
) ;
68
67
@@ -79,8 +78,7 @@ class TemplatesWorker {
79
78
80
79
requireFnFromTemplate = async ( packageOrPath ) => {
81
80
const isPath =
82
- lodash . startsWith ( packageOrPath , "./" ) ||
83
- lodash . startsWith ( packageOrPath , "../" ) ;
81
+ packageOrPath . startsWith ( "./" ) || packageOrPath . startsWith ( "../" ) ;
84
82
85
83
if ( isPath ) {
86
84
return await import (
@@ -112,7 +110,7 @@ class TemplatesWorker {
112
110
113
111
if ( fileContent ) {
114
112
this . logger . log (
115
- `"${ lodash . lowerCase ( name ) } " template found in "${ templatePaths . custom } "` ,
113
+ `"${ name . toLowerCase ( ) } " template found in "${ templatePaths . custom } "` ,
116
114
) ;
117
115
return fileContent ;
118
116
}
@@ -124,16 +122,14 @@ class TemplatesWorker {
124
122
} else {
125
123
if ( templatePaths . custom ) {
126
124
this . logger . warn (
127
- `"${ lodash . lowerCase ( name ) } " template not found in "${
125
+ `"${ name . toLowerCase ( ) } " template not found in "${
128
126
templatePaths . custom
129
127
} "`,
130
128
"\nCode generator will use the default template" ,
131
129
) ;
132
130
} else {
133
131
this . logger . log (
134
- `Code generator will use the default template for "${ lodash . lowerCase (
135
- name ,
136
- ) } "`,
132
+ `Code generator will use the default template for "${ name . toLowerCase ( ) } "` ,
137
133
) ;
138
134
}
139
135
}
@@ -178,11 +174,10 @@ class TemplatesWorker {
178
174
getTemplateContent = ( path ) => {
179
175
const foundTemplatePathKey = lodash
180
176
. keys ( this . config . templatePaths )
181
- . find ( ( key ) => lodash . startsWith ( path , `@${ key } ` ) ) ;
177
+ . find ( ( key ) => path . startsWith ( `@${ key } ` ) ) ;
182
178
183
179
const rawPath = resolve (
184
- lodash . replace (
185
- path ,
180
+ path . replace (
186
181
`@${ foundTemplatePathKey } ` ,
187
182
this . config . templatePaths [ foundTemplatePathKey ] ,
188
183
) ,
0 commit comments