Skip to content

Commit 2ad64dc

Browse files
committed
Update excluded directories
1 parent ab242ad commit 2ad64dc

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

tools/scripts/find_packages

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,27 @@ kernel=$(uname -s)
1111
# Determine root directory:
1212
root_dir="$(git rev-parse --show-toplevel)"
1313

14+
# Define the project source code directory:
15+
base_dir="${root_dir}/lib/node_modules"
16+
1417
# Define the path to the build directory:
1518
build_dir="${root_dir}/build"
1619

20+
# Define the directory path for distributable files:
21+
dist_dir="${root_dir}/dist"
22+
23+
# Define the directory path for external library dependencies:
24+
deps_dir="${root_dir}/deps"
25+
1726
# Define the path to the reports directory:
1827
reports_dir="${root_dir}/reports"
1928

2029
# Define the directory for top-level tools:
2130
tools_dir="${root_dir}/tools"
2231

32+
# Define the directory for project tools which are Node.js packages:
33+
tools_pkgs_dir="${base_dir}/_tools"
34+
2335
# Define the path to node modules:
2436
node_modules="${root_dir}/node_modules"
2537

@@ -38,9 +50,9 @@ main() {
3850

3951
# On Mac OSX, in order to use `|` and other regular expression operators, we need to use enhanced regular expression syntax (-E); see https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man7/re_format.7.html#//apple_ref/doc/man/7/re_format.
4052
if [[ "${kernel}" == "Darwin" ]]; then
41-
pkgs=$(find -E "${root_dir}" -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${build_dir}/*" -not -path "${reports_dir}/*" -not -path "${tools_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
53+
pkgs=$(find -E "${root_dir}" -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${tools_dir}/*" -not -path "${tools_pkgs_dir}/*" -not -path "${deps_dir}/*" -not -path "${build_dir}/*" -not -path "${dist_dir}/*" -not -path "${reports_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
4254
else
43-
pkgs=$(find "${root_dir}" -regextype posix-extended -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${build_dir}/*" -not -path "${reports_dir}/*" -not -path "${tools_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
55+
pkgs=$(find "${root_dir}" -regextype posix-extended -not -path "${root_dir}/.*" -not -path "${node_modules}/*" -not -path "${tools_dir}/*" -not -path "${tools_pkgs_dir}/*" -not -path "${deps_dir}/*" -not -path "${build_dir}/*" -not -path "${dist_dir}/*" -not -path "${reports_dir}/*" -regex "${packages_filter}" -name "${packages_file}" -exec dirname {} \;)
4456
fi
4557
echo "${pkgs}"
4658
}

0 commit comments

Comments
 (0)