[wp-trac] [WordPress Trac] #29883: Split Gruntfile.js into multiple files
WordPress Trac
noreply at wordpress.org
Tue Mar 24 18:33:36 UTC 2015
#29883: Split Gruntfile.js into multiple files
------------------------------+------------------------------
Reporter: jorbin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
------------------------------+------------------------------
Comment (by kadamwhite):
As noted above, I was working on this at WCSF until @jorbin asked me to
stop. I agree with some of his concerns with this patch, and I disagree
with others. To wit:
- I strongly support multiple files. It (subjectively) makes it easier to
find the code you are looking for, not harder, when each file has a
clearly separated set of functionality.
- It is possible, possibly even recommended, to fragment the tasks by
filename not based on what plugin we're using, but by the type of task
being done. So `tools/grunt/css-style.js` (e.g.) stores whatever cssjanus
or rtlcss option we're choosing, and possibly any other CSS lint-type
tasks. That way a shift in the tools used is clearly reflected in the
history.
- Putting first-party code into node_modules is an antipattern. We should
keep the task definitions inside the appropriate tooling folders, and
require them directly. Plugins can be externalized (e.g. grunt-patch-
wordpress), but the actual invocations of those plugins do belong
alongside the code they touch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29883#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list