distributor icon indicating copy to clipboard operation
distributor copied to clipboard

Tooling: Replace custom gulp build with WP Scripts

Open peterwilsoncc opened this issue 3 years ago • 2 comments

Is your enhancement related to a problem? Please describe.

To allow ease of contribution within the WordPress developer system, it would be good to switch from a custom gulp build to @wordpress/scripts for asset generation.

A side benefit is that the assert versions will be auto generated based on a hash of the built file/s so the chance of forgetting to bump a constant is reduced.

Designs

No response

Describe alternatives you've considered

10up Toolkit

This was considered but as an open-source project I figured WP Scripts was better to make contributing easier.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

peterwilsoncc avatar Jun 14 '22 04:06 peterwilsoncc

@dkotter any thoughts on best approach on this given historical knowledge of Distributor and options with wpscripts and 10uptoolkit compared to gulp?

jeffpaul avatar Jun 14 '22 16:06 jeffpaul

I'm sure there will be some issues we run into while making these changes but I believe this is a worthwhile change and I don't think there's anything we're doing that can't also be done with WP Scripts (which I do think is the better option here as compared to 10up Toolkit).

As far as history goes here, I believe we went with Gulp as that was what we used on most projects back when this was being added to Distributor (Feb 2018). We've gone through multiple build processes at 10up both before and since then but we've never changed things here because it's worked (though it is past due for a refresh).

The only thing I'd mention to keep in mind is we do use Gulp as part of the release process (see #216). There's probably a better/different way to achieve that as well, which I would prefer to just get rid of Gulp all together rather than keep it around for that release copy process.

dkotter avatar Jun 14 '22 21:06 dkotter