-
Notifications
You must be signed in to change notification settings - Fork 1
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
Explore implementing @wordpress/scripts #118
base: main
Are you sure you want to change the base?
Conversation
87b9038
to
2fd3747
Compare
2fd3747
to
37fc063
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 might be the only plugin that I can still see a need for if its not handled by wp-scripts. This came from a need with developers including various files and how they were handled. A warning added to show them that a file should not be in that location and would need to be moved.
Is this situation handled by wp-scripts
?
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 flagging this, wp-scripts
doesn't have any functionality for supporting a static
directory, so I carried over our implementation but missed this part
I've put in some additional time to test this further today and have come across a number of issues. I'll be listing as their own individual comments so they can be referenced properly. I also want to re-iterate what was discussed in our strategy meeting: this is moving out of scope with additional changes to the way the. I want the focus to be on providing a Those additional changes should be in their own ticket with their own scope. |
Build Not Able To RunThe build is not able to run without This means that rm -rf node_modules
npm i
cd example-site
node ../cli/cli.js build Output
|
a11y package conflictRunning a successful build will show errors for eslint and the jsx-a11y. Output
|
|
Linters catching files outside of
|
|
Always runs in
|
Hi @ampersarnie, I understand your concerns. The reason I've left this PR in draft status is because I'm simply exploring an idea, it's not feature complete by any means and I'm also not necessarily aiming for it to be merged. The reasons I shared it are twofold:
As I mentioned on the original issue, I first looked at extending the existing build-tools webpack config with support for I'm not sure from your comments whether you want me to address the points you've raised or you're asking me to drop this approach entirely? |
Description
This PR explores the possibility of extending our config from those exposed via
@wordpress/scripts
Related #117
This approach retains the existing package discovery to determine which mode to run the build tools in, and which packages to build, but rather than stitching together webpack entrypoints for each project, it will use
concurrently
to run separate webpack processes for each project.This greatly simplifies the configuration within the build tools, but is not yet fully tested/implemented.
Tasks to do:
Project discovery
Webpack config
@wordpress/scripts
src/entrypoints
*/static
directory content to/build/static
block.json
supportrender.php
supportimport myComponent from '@Components'
)*ESLint config
@wordpress/scripts
Prettier config
@wordpress/scripts
Stylelint config
@wordpress/scripts
* build tools feature, not part of
@wordpress/scripts
** change to existing build tools, bundles are outputted to
/build
not/dist/scripts
anddist/styles
Next steps
wp-scripts
, discuss whether we're opinionated on anything to override configs