Skip to content

Commit a545808

Browse files
authored
chore: fix JavaScript lint errors
PR-URL: #10481 Closes: #10112 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent a78342c commit a545808

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • lib/node_modules/@stdlib/_tools/docs/www/readme-fragment-file-tree/lib

lib/node_modules/@stdlib/_tools/docs/www/readme-fragment-file-tree/lib/write.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020

2121
// MODULES //
2222

23-
var path = require( 'path' );
23+
var join = require( 'path' ).join;
2424
var logger = require( 'debug' );
2525
var mkdirp = require( 'mkdirp' );
26+
var dirname = require( '@stdlib/utils/dirname' );
2627
var objectKeys = require( '@stdlib/utils/keys' );
2728
var writeFile = require( '@stdlib/fs/write-file' );
2829

@@ -72,8 +73,8 @@ function write( src, dest, db, clbk ) {
7273
i += 1;
7374

7475
file = files[ i ];
75-
dpath = path.dirname( file.substring( src.length+1 ) ); // +1 to account for path separator
76-
dpath = path.join( dest, dpath );
76+
dpath = dirname( file.substring( src.length+1 ) ); // +1 to account for path separator
77+
dpath = join( dest, dpath );
7778

7879
debug( 'Creating output directory: %s', dpath );
7980
mkdirp( dpath, onDir );
@@ -93,7 +94,7 @@ function write( src, dest, db, clbk ) {
9394
}
9495
debug( 'Successfully created output directory.' );
9596

96-
fpath = path.join( dpath, BASENAME );
97+
fpath = join( dpath, BASENAME );
9798
debug( 'Writing file %d of %d: %s', i+1, total, fpath );
9899

99100
writeFile( fpath, db[ file ], fopts, onWrite );

0 commit comments

Comments
 (0)