-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add back globing #749
Conversation
if (basename(content) === "package.json" && nwPkg === undefined) { | ||
nwPkg = JSON.parse(await readFile(content)); | ||
} | ||
files.push(...contents); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this go outside the loop?
I'm getting
[ ERROR ] 2023-01-05T08:19:05.751Z Invalid array length
with it inside the loop when I have a large number of matched files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additionally, this seems to conflict:
You describe srcDir
as: "Directory to hold NW app files unless or array of file glob patterns"
But then you do this:
Line 89 in af32f10
let patterns = options.srcDir.split(" "); |
If a user provides an array of glob patterns (like you document is allowed), it will fail.
Description
The
nwbuild
function parses the globing patterns insrcDir
(for eg:srcDir: "./src/**/* .dist/**/*"
) and saves the list of file names in thefiles
variable. Thepackager
function uses the array to copy the relevant files to theoutDir
.