code: function (abspath, targetFilePath, pattern, files, staticBlock) {
          if (targetFilePath in files) {
              grunt.warn('In the file: ' + abspath + ', the target filename: ' + targetFilePath + ' has already defined in this or other html template file.');
          }
          var results = staticBlock.match(pattern);
          if (results) {
              files[targetFilePath] = [];
              for (var index in results) {
                  // results[index] could be like below, use staticPattern to fetch real static filepath further.
                  // <link href="${request.static_url('zuoyeproject:static/css/bootstrap.css')}" rel="stylesheet" media="screen">
                  // <script src="${request.static_url('zuoyeproject:static/editor/common.js')}">
                  var result = results[index].match(applyminGlobal.staticPattern);
                  if (result === null || result.length < 2) {
                      grunt.warn('Please check whether your "options.staticPattern": ' + applyminGlobal.staticPattern + '\n\ncould be used to fetch the static resource:\n\n' + results[index] + '\n\nin the file ' + '"' + abspath + '"');
                  }
                  if (!grunt.file.exists(result[1])) {
                      grunt.warn('This file does not exist: "' + result[1] + '"');
                  }
                  files[targetFilePath].push(result[1]);
              }
          }
      }
docs: Please see the Grunt documentation for more information regarding task creation: http://gruntjs.com/creating-tasks Put all the css or js files in one static block to the coressponding files object.