How to ignore files grunt uglify

后端 未结 1 1928
粉色の甜心
粉色の甜心 2020-12-04 17:57

Background

I\'ve just started using grunt as of about 30mins ago. So bear with me.

But I have a rather simple script going that will look at

相关标签:
1条回答
  • 2020-12-04 18:11

    To the end of the src array, add

    '!docroot/js/main.min.js'
    

    This will exclude it. The ! turns it into an exclude.

    http://gruntjs.com/api/grunt.file#grunt.file.expand

    Paths matching patterns that begin with ! will be excluded from the returned array. Patterns are processed in order, so inclusion and exclusion order is significant.

    This is not specific to grunt uglify, but any task that uses grunt convention for specifying files will work this way.

    As a general advice though I would suggest putting built files somewhere else than your source files. Like in a root dist folder.

    0 讨论(0)
提交回复
热议问题