wp-cli / ideas

💡 Ideas and feature requests are collected here
40 stars 1 forks source link

Support scaffolding with Gulp #60

Closed JPry closed 6 years ago

JPry commented 7 years ago

While Grunt is commonly used for developing plugins and themes, Gulp is also used as an alternative. It would be nice to see the option to use Gulp instead of Grunt when scaffolding.

This could be a matter of a flag like --gulp. Or to be more flexible to future additions, it could be something like --task-runner=gulp. The default would be --task-runner=grunt.

danielbachhuber commented 7 years ago

Can you share a proposed Gulp template that implements the same features as our existing Grunt template?

JPry commented 7 years ago

@danielbachhuber Here you go: https://gist.github.com/JPry/843e00c834e54b9b3f021856bfde1e0f.

It would also be easy to add in things like compiling SASS, concatenation and magnification of CSS and JS files, etc. I left those out since they weren't in the current Grunt scaffold.

This is inspired by the WebDevStudios/wd_s Gulpfile.

JPry commented 7 years ago

Note that I haven't actually tested a project using the gulp-checktextdomain library. I would want to verify that works as described before committing to including that one.

GaryJones commented 7 years ago

FWIW, the PHPCS + WPCS check for correct use of textdomain is far more complete than gulp-checktextdomain.

JPry commented 7 years ago

@GaryJones I wasn't aware that WPCS could be used for checking the correct textdomain. Does it also allow for fixing the textdomain value using phpcbf?

GaryJones commented 7 years ago

@JPry Right now, no, it doesn't. I've opened https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1174 as I think it should be relatively trivial to add it in, when there is only a single allowed textdomain defined in phpcs.xml.dist.

danielbachhuber commented 6 years ago

Grunt is the official WordPress tool, so we're not going to add a Gulp file we have to maintain too https://github.com/WordPress/packages/pull/55#issuecomment-352924029