Skip to content

Commit ea1d2d3

Browse files
committed
Fixup: fileName => filename
1 parent 4618375 commit ea1d2d3

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function makeCopier(copyConfig, assetManager, { compact } = {}) {
5555
return Promise.all([
5656
(filepaths ? fileFinder.match(filepaths) : fileFinder.all()),
5757
determineTargetDir(source, target)
58-
]).then(([fileNames, targetDir]) => {
59-
return processFiles(fileNames, {
58+
]).then(([filenames, targetDir]) => {
59+
return processFiles(filenames, {
6060
assetManager, source, target, targetDir, compactors, fingerprint
6161
});
6262
});
@@ -92,23 +92,23 @@ function determineTargetDir(source, target) {
9292
}
9393

9494
/**
95-
* @param {string[]} fileNames
95+
* @param {string[]} filenames
9696
* @param {ProcessFile} config
9797
* @returns {Promise<unknown>}
9898
*/
99-
function processFiles(fileNames, config) {
100-
return Promise.all(fileNames.map(fileName => processFile(fileName, config)));
99+
function processFiles(filenames, config) {
100+
return Promise.all(filenames.map(filename => processFile(filename, config)));
101101
}
102102

103103
/**
104-
* @param {string} fileName
104+
* @param {string} filename
105105
* @param {ProcessFile} opts
106106
* @returns {Promise<unknown>}
107107
*/
108-
async function processFile(fileName,
108+
async function processFile(filename,
109109
{ source, target, targetDir, fingerprint, assetManager, compactors }) {
110-
let sourcePath = path.join(source, fileName);
111-
let targetPath = path.join(target, fileName);
110+
let sourcePath = path.join(source, filename);
111+
let targetPath = path.join(target, filename);
112112

113113
try {
114114
var content = await readFile(sourcePath); // eslint-disable-line no-var

types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export interface Config {
3535
fingerprint?: boolean,
3636
compact?: CompactorMap,
3737
assetManager: AssetManager,
38-
filter?: (fileName: string) => boolean
38+
filter?: (filename: string) => boolean
3939
}
4040

4141
export interface CompactorMap {
@@ -47,7 +47,7 @@ export interface Compactor {
4747
}
4848

4949
export interface ProcessFile {
50-
(fileName: string, opts: ProcessFileOpts): Promise<unknown>
50+
(filename: string, opts: ProcessFileOpts): Promise<unknown>
5151
}
5252

5353
export interface ProcessFileOpts {

0 commit comments

Comments
 (0)