diff --git a/dev/tools/grunt/configs/clean.js b/dev/tools/grunt/configs/clean.js index 2edf358670473..6e5512ab8a69d 100644 --- a/dev/tools/grunt/configs/clean.js +++ b/dev/tools/grunt/configs/clean.js @@ -38,7 +38,6 @@ var cleanOptions = { "dot": true, "src": [ "<%= path.tmp %>/cache/**/*", - "<%= path.tmp %>/generation/**/*", "<%= path.tmp %>/log/**/*", "<%= path.tmp %>/maps/**/*", "<%= path.tmp %>/page_cache/**/*", @@ -89,7 +88,6 @@ var cleanOptions = { "dot": true, "src": [ "<%= path.tmp %>/cache/**/*", - "<%= path.tmp %>/generation/**/*", "<%= path.tmp %>/view_preprocessed/html/**/*", "<%= path.tmp %>/page_cache/**/*" ] @@ -110,6 +108,19 @@ var cleanOptions = { ] } ] + }, + "generation": { + "force": true, + "files": [ + { + "force": true, + "dot": true, + "src": [ + "<%= path.generation %>code/**/*", + "<%= path.generation %>metadata/**/*" + ] + } + ] } }; diff --git a/dev/tools/grunt/configs/path.js b/dev/tools/grunt/configs/path.js index 5a9a4f6ad1598..e2320d702441e 100644 --- a/dev/tools/grunt/configs/path.js +++ b/dev/tools/grunt/configs/path.js @@ -32,5 +32,6 @@ module.exports = { whitelist: 'dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/', blacklist: 'dev/tests/static/testsuite/Magento/Test/Js/_files/blacklist/', tmp: 'validation-files.txt' - } + }, + generation: 'generated/' };