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.
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. |


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 releasecommand as I think it is needed to copy files in to thereleasesubdirectory for committing to thestablebranch. 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: