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.

124 lines
2.5 KiB

9 years ago
  1. var
  2. config = require('../user'),
  3. release = require('./release')
  4. ;
  5. module.exports = {
  6. banner : release.banner,
  7. log: {
  8. created: function(file) {
  9. return 'Created: ' + file;
  10. },
  11. modified: function(file) {
  12. return 'Modified: ' + file;
  13. }
  14. },
  15. filenames: {
  16. concatenatedCSS : 'semantic.css',
  17. concatenatedJS : 'semantic.js',
  18. concatenatedMinifiedCSS : 'semantic.min.css',
  19. concatenatedMinifiedJS : 'semantic.min.js',
  20. concatenatedRTLCSS : 'semantic.rtl.css',
  21. concatenatedMinifiedRTLCSS : 'semantic.rtl.min.css'
  22. },
  23. regExp: {
  24. comments: {
  25. // remove all comments from config files (.variable)
  26. variables : {
  27. in : /(\/\*[\s\S]+?\*\/+)[\s\S]+?\/\* End Config \*\//,
  28. out : '$1',
  29. },
  30. // add version to first comment
  31. license: {
  32. in : /(^\/\*[\s\S]+)(# Semantic UI )([\s\S]+?\*\/)/,
  33. out : '$1$2' + release.version + ' $3'
  34. },
  35. // adds uniform spacing around comments
  36. large: {
  37. in : /(\/\*\*\*\*[\s\S]+?\*\/)/mg,
  38. out : '\n\n$1\n'
  39. },
  40. small: {
  41. in : /(\/\*---[\s\S]+?\*\/)/mg,
  42. out : '\n$1\n'
  43. },
  44. tiny: {
  45. in : /(\/\* [\s\S]+? \*\/)/mg,
  46. out : '\n$1'
  47. }
  48. },
  49. theme: /.*\/themes\/.*?(?=\/)/mg
  50. },
  51. settings: {
  52. /* Remove Files in Clean */
  53. del: {
  54. silent : true
  55. },
  56. /* Comment Banners */
  57. header: {
  58. title : release.title,
  59. version : release.version,
  60. repository : release.repository,
  61. url : release.url
  62. },
  63. /* What Browsers to Prefix */
  64. prefix: {
  65. browsers: [
  66. 'last 2 version',
  67. '> 1%',
  68. 'opera 12.1',
  69. 'safari 6',
  70. 'ie 9',
  71. 'bb 10',
  72. 'android 4'
  73. ]
  74. },
  75. /* File Renames */
  76. rename: {
  77. minJS : { extname : '.min.js' },
  78. minCSS : { extname : '.min.css' },
  79. rtlCSS : { extname : '.rtl.css' },
  80. rtlMinCSS : { extname : '.rtl.min.css' }
  81. },
  82. /* Minified CSS Concat */
  83. minify: {
  84. processImport : false,
  85. keepSpecialComments : 1
  86. },
  87. /* Minified JS Settings */
  88. uglify: {
  89. mangle : true,
  90. preserveComments : 'some'
  91. },
  92. /* Minified Concat CSS Settings */
  93. concatMinify: {
  94. processImport : false,
  95. keepSpecialComments : false
  96. },
  97. /* Minified Concat JS */
  98. concatUglify: {
  99. mangle : true,
  100. preserveComments : false
  101. }
  102. }
  103. };