Skip to content

Commit

Permalink
Rename variable elsewhere as well
Browse files Browse the repository at this point in the history
  • Loading branch information
hariombalhara committed Jul 7, 2021
1 parent 5ea3a14 commit 8e3b181
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/kit/src/core/create_manifest_data/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,18 +254,18 @@ export default function create_manifest_data({ config, output, cwd = process.cwd
/**
* @type {string[]}
*/
let excludedPaths = [];
let excluded_paths = [];

exclusions.forEach((exclusion) => {
excludedPaths = [
...excludedPaths,
excluded_paths = [
...excluded_paths,
...glob(exclusion, {
cwd: assets_dir,
dot: true
})
];
});
assets = list_files(assets_dir, '', [], excludedPaths);
assets = list_files(assets_dir, '', [], excluded_paths);
}

return {
Expand Down Expand Up @@ -404,7 +404,7 @@ function get_pattern(segments, add_trailing_slash) {
* @param {string} dir
* @param {string} path
* @param {import('types/internal').Asset[]} files
* @param {string[]} excludedPaths Paths relative to dir which should be excluded from files list.
* @param {string[]} excluded_paths Paths relative to dir which should be excluded from files list.
*/
function list_files(dir, path, files = [], excluded_paths = []) {
fs.readdirSync(dir).forEach((file) => {
Expand All @@ -414,9 +414,9 @@ function list_files(dir, path, files = [], excluded_paths = []) {
const joined = path ? `${path}/${file}` : file;

if (stats.isDirectory()) {
list_files(full, joined, files, excludedPaths);
list_files(full, joined, files, excluded_paths);
} else {
if (excludedPaths.includes(joined)) {
if (excluded_paths.includes(joined)) {
return;
}
files.push({
Expand Down

0 comments on commit 8e3b181

Please sign in to comment.