Skip to:

Opened 10 years ago

Last modified 5 months ago

#2667 new defect (bug)

Grunt clean:dynamic task does not delete file/s from /build during grunt watch task

Reported by: netweb's profile netweb Owned by:
Milestone: Future Release Priority: low
Severity: minor Version: trunk
Component: Tools Keywords: needs-patch


When running the Grunt task grunt watch a file that is modified and saved should be cleaned from the /build folder and the modified file copied from the /src folder to the /build folder as part of the watch:all task:

tasks: [ 'clean:dynamic', 'copy:dynamic' ],

Currently the clean:dynamic task does not actually 'clean' (delete) the file from the /build folder, the copy:dynamic task overwrites the existing file.

Workaround: Do nothing and continue to have the file overwritten without cleaning first.


  1. Fix the clean:dynamic task to actually 'clean' (delete) the file from /build
  1. Remove the clean:dynamic task from the clean and watch:all tasks list

To reproduce:

  • Temporarilly remove copy:dynamic from the watch:all task tasks list
  • Run grunt watch
  • Edit a file from /src and save

Expected Results:

  • Edited file should be 'cleaned' (deleted) in /build folder

Actual results:

  • File remains in /build folder

See also replicated upstream ticket for WordPress Core: #WP29066

Change History (0)

Note: See TracTickets for help on using tickets.