[wp-trac] [WordPress Trac] #47749: Build tools: remove all old files when cleaning

WordPress Trac noreply at wordpress.org
Mon Jul 22 19:42:27 UTC 2019


#47749: Build tools: remove all old files when cleaning
------------------------------+---------------------
 Reporter:  azaozz            |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  5.3
Component:  Build/Test Tools  |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  needs-testing     |     Focuses:
------------------------------+---------------------

Comment (by azaozz):

 Was looking a bit more at what we "grunt clean" and why:
 - `clean:files` cleans everything from `/build`. Wondering if there's need
 to separately clean /js and /css there.
 - Running Webpack when building the js also creates `/src/wp-
 includes/css/dist`. It needs to be "cleaned" when cleaning the js or it
 may get deleted after it's created.
 - After building to `/build` there's a leftover `/src/wp-includes/js`
 directory with some of the js files.

 In 47749.1.diff:
 - Switch `grunt clean:js` and `grunt clean:css` to only clean in `/src`.
 Can make that that dependent on passing `--dev` but not sure it's needed.
 - Delete `/src/wp-includes/css/dist` when running `clean:js`.
 - Run `clean:js` after building in `/build` to remove `/src/wp-
 includes/js`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47749#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list