File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
lib/node_modules/@stdlib/_tools/scripts Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -229,12 +229,13 @@ function create( fullPath ) {
229
229
while ( match !== null ) {
230
230
name = match [ 1 ] ;
231
231
pkgPath = match [ 2 ] ;
232
- stmt = replace ( IMPORT_STATEMENT , '<name>' , name ) ;
233
- stmt = replace ( stmt , '<path>' , pkgPath ) ;
234
- importStmts . push ( stmt ) ;
235
232
236
233
tsDefPath = replace ( require . resolve ( pkgPath ) , 'lib/index.js' , 'docs/types/index.d.ts' ) ;
237
234
if ( fs . existsSync ( tsDefPath ) ) {
235
+ stmt = replace ( IMPORT_STATEMENT , '<name>' , name ) ;
236
+ stmt = replace ( stmt , '<path>' , pkgPath ) ;
237
+ importStmts . push ( stmt ) ;
238
+
238
239
tsDef = fs . readFileSync ( tsDefPath , 'utf-8' ) ;
239
240
mainExport = tsDef . match ( RE_TS_EXPORT ) ;
240
241
RE_DOC_MAIN_DECLARE = new RegExp ( '(\\/\\*\\*\\n[\\s\\S]+?\\*\\/)\ndeclare (function|var|const) ' + mainExport [ 1 ] + '([\\s\\S]*): ([\\s\\S]+?);' ) ;
You can’t perform that action at this time.
0 commit comments