1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
'use strict';
var themes = require('../tools/files-router').get('themes'),
_ = require('underscore');
var themeOptions = {};
_.each(themes, function(theme, name) {
themeOptions[name] = {
"force": true,
"files": [
{
"force": true,
"dot": true,
"src": [
"<%= path.tmp %>/cache/**/*",
"<%= combo.autopath(\""+name+"\", path.pub ) %>**/*",
"<%= combo.autopath(\""+name+"\", path.tmpLess) %>**/*",
"<%= combo.autopath(\""+name+"\", path.tmpSource) %>**/*",
"<%= path.deployedVersion %>"
]
}
]
};
});
var cleanOptions = {
"var": {
"force": true,
"files": [
{
"force": true,
"dot": true,
"src": [
"<%= path.tmp %>/cache/**/*",
"<%= path.tmp %>/generation/**/*",
"<%= path.tmp %>/log/**/*",
"<%= path.tmp %>/maps/**/*",
"<%= path.tmp %>/page_cache/**/*",
"<%= path.tmp %>/tmp/**/*",
"<%= path.tmp %>/view/**/*",
"<%= path.tmp %>/view_preprocessed/**/*"
]
}
]
},
"pub": {
"force": true,
"files": [
{
"force": true,
"dot": true,
"src": [
"<%= path.pub %>frontend/**/*",
"<%= path.pub %>adminhtml/**/*",
"<%= path.deployedVersion %>"
]
}
]
},
"styles": {
"force": true,
"files": [
{
"force": true,
"dot": true,
"src": [
"<%= path.tmp %>/view_preprocessed/**/*",
"<%= path.tmp %>/cache/**/*",
"<%= path.pub %>frontend/**/*.less",
"<%= path.pub %>frontend/**/*.css",
"<%= path.pub %>adminhtml/**/*.less",
"<%= path.pub %>adminhtml/**/*.css",
"<%= path.deployedVersion %>"
]
}
]
},
"markup": {
"force": true,
"files": [
{
"force": true,
"dot": true,
"src": [
"<%= path.tmp %>/cache/**/*",
"<%= path.tmp %>/generation/**/*",
"<%= path.tmp %>/view_preprocessed/html/**/*",
"<%= path.tmp %>/page_cache/**/*"
]
}
]
},
"js": {
"force": true,
"files": [
{
"force": true,
"dot": true,
"src": [
"<%= path.pub %>**/*.js",
"<%= path.pub %>**/*.html",
"<%= path.pub %>_requirejs/**/*",
"<%= path.deployedVersion %>"
]
}
]
}
};
module.exports = _.extend(cleanOptions, themeOptions);