You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

129 lines
3.4 KiB

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