-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Scripts: Do not exit build
when no entry found in src
directory
#38737
Conversation
db32672
to
4e2dfce
Compare
I'm planning to publish this fix to npm soon after this change is merged. |
Size Change: 0 B Total Size: 1.15 MB ℹ️ View Unchanged
|
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.
Thanks, this looks good and is also working for me. 👍
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.
Thanks for addressing this!
Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Prettier didn't like the changes and I had to fix that in the |
…38737) * Scripts: Do not exit `build` when no entry found in `src` directory * Apply suggestions from code review Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com> Co-authored-by: Dominik Schilling <dominikschilling+git@gmail.com>
Description
Fixes #38739.
Addressed the issue raised by @loxK in #38584 (comment).
I followed the recommendation and added an early return when there is no
src
directory. In case when thesrc
directory exists then the script still shows the warning but it returns the defaul value forentry
which is{}
.I also included a missed CHANGELOG entry for #38584.
Testing Instructions
Run:
Try removing a script file referenced in the
block.json
and run the build again:You should see a warning and the build should run but it will only copy a
block.json
file:If you rename the
src
directory then the build should still run but will finish without any files processed:Types of changes
Bug fix (non-breaking change which fixes an issue).
Checklist:
*.native.js
files for terms that need renaming or removal).