-
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: Use default value for process.env.WP_SRC_DIRECTORY #44367
Scripts: Use default value for process.env.WP_SRC_DIRECTORY #44367
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @loxK! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
370783c
to
bcf3b8e
Compare
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.
This looks about right to me. Thanks for the PR, Laurent 🙂
@gziolo, what do you think? Should we also centralize the default value defined on build.js
and start.js
so there's only a single place where the 'src'
string is defined?
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.
Oh, would you please rename the function from getWebpackSrcDirectory
to getWordPressSrcDirectory
? Thanks!
b4e5360
to
c4c2b2c
Compare
I thought about it too, but decided it was up to you. |
c4c2b2c
to
1439552
Compare
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.
This looks good to go, @luisherranz is there anything I missed?
If you think it's good, let's merge it 🙂 |
Congratulations on your first merged pull request, @loxK! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
Thanks for your contribution, @loxK! |
I appreciate but it is nothing compared to how useful is WordPress to me. Thank YOU guys. |
@loxK wanted to follow up - did you make a WordPress.org profile? If so, can you share the link here? For example, here's mine: https://profiles.wordpress.org/annezazu/ We'd love to gives you props in the next WordPress release but need your WordPress.org username to do so. You can follow the steps above to set it up correctly: #44367 (comment) Thank you! |
@annezazu Here you go, thanks |
What?
Fixes this regression: #44309
Why?
See discussion here: #43917 (review)
How?
Using wp-scripts command, if is not specified,
process.env.WP_SRC_DIRECTORY
defaults to string 'src'. When extending the webpack.config.js directly, it should behave the same.