-
Notifications
You must be signed in to change notification settings - Fork 156
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
Replace gulp build with wp-scripts. #916
Conversation
This removes all of the previous build tools and introduces the `@wordpress/scripts` as the build tool. This is intended to increase external contributions by using a tools known within the wider WordPress community. As a WIP, the build is expected to be broken after this commit.
d30e9ab
to
55d7975
Compare
@@ -0,0 +1,35 @@ | |||
const CopyPlugin = require( 'copy-webpack-plugin' ); |
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.
I'm using this in place of the gulp copy script to copy all the files over during the release
step.
I don't really like it or think it's a proper use of webpack so suggestions on how to do this without this would be much appreciated.
e8ce036
to
eb89066
Compare
# Conflicts: # .github/workflows/lint.yml # package-lock.json # package.json
Distributor now uses Cypress for e2e tests so the wp-scripts are unused. Existing workflows call phpunit directly so there is no need for the unit test script either.
c36ff84
to
6ddb027
Compare
6ddb027
to
5d94b4b
Compare
# Conflicts: # package-lock.json # package.json
I think I've addressed the various issues @dinhtungdu picked up:
WP Scripts doesn't seem to produce code compatible with older versions of WP so I've pulled in 04a1580 from the requirements bump PR as both the version bump and this issue are on the same milestone. |
@peterwilsoncc Thanks for the updates! I can confirm all issues I noted are addressed. I did another round of testing and found some additional issues, please check the screenshots below for more detail. |
Distributor panel restored in 0b53814 -- I'd reversed a media query. For the The property shows the current state, the attribute the state at page load. If you run |
@dinhtungdu I think this is ready for another review. I recommend suppressing white space. For now I have kept all the built asset file names the same which means the webpack config is a little odd. I've done this for back-compat but if it's decided it isn't needed then that can be done in a smaller follow up commit. |
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.
Awesome! 🎉
Thank you so much for this hard work! This PR tested well on my end.
Description of the Change
Replace gulp and various config files with
@wordpress/scripts
.I think this is ready for review, it should probably get double sign-off as it is quite large. I recommend reviewing this with whitespace suppressed.
I have put together a second webpack config for the
npm run release
command as I think it is needed to copy files in to therelease
subdirectory for committing to thestable
branch. As noted inline, I would love an alternative suggestion as it doesn't seem ideal.Closes #892.
How to test the Change
Changelog Entry
Credits
Props @peterwilsoncc, @dinhtungdu
Checklist: