Scripts: Use default value for process.env.WP_SRC_DIRECTORY. Fixes #44309.
What?
Fixes this regression: WordPress/gutenberg#44309
Why?
See discussion here: https://github.com/WordPress/gutenberg/pull/43917#pullrequestreview-1113911446
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.
:wave: 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.
@gziolo, what do you think? Should we also centralize the default value defined on
build.jsandstart.jsso there's only a single place where the'src'string is defined?
I thought about it too, but decided it was up to you.
@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!
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: https://github.com/WordPress/gutenberg/pull/44367#issuecomment-1257979289
Thank you!
@annezazu Here you go, thanks
https://profiles.wordpress.org/dreadlox/