Home  >  Q&A  >  body text

Problem with grunt concat - Stack Overflow

The concat task was added to grunt's watch, but I found that concat does an append operation. In this case, the code generated by the previous concat is still there. Is there any way to solve it?

 concat : {      // concat插件的配置信息
            options: {  
              separator: ';',  
              stripBanners: true
            }, 
            test_grunt : {   // 名称而已~
                files : { 
                   'public/js/qiniu/upFile.js': ['public/js/qiniu/*.js'],
                   'public/js/lib/biaoqing.js': ['public/js/lib/*.js']
                }
            }
         },

Every time it is run, it will append to the previous upFile.js, causing the file to get bigger and bigger

PHP中文网PHP中文网2685 days ago520

reply all(1)I'll reply

  • 迷茫

    迷茫2017-05-19 10:46:50

    Do a clean first.

    grunt-contrib-clean

    reply
    0
  • Cancelreply