How can I use grunt-regarde with grunt-contrib-coffee to only compile changed .coffee files?

前端 未结 3 837
长发绾君心
长发绾君心 2020-12-29 10:57

My project has over 300 CoffeeScript files, so it takes several seconds to recompile everything. I\'d like to only recompile the changed CoffeeScript files.

Here\'s

3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-29 11:58

    grunt.regarde.changed is an array correct?

    Should src: ['<%= grunt.regarde.changed %>']

    be src: '<%= grunt.regarde.changed %>'

    I looked through grunt-contrib-coffee's source for a second to see if it could be not correctly handling whatever you're giving it. Looked kind of likely that the stringified array you're giving it, doesn't get caught and dealt with.

    I think what you're passing accidentally may be: src: [ '[path1, path2, path3, etc]' ]

    If I'm way off base, leave a comment and I'll delete this answer.

提交回复
热议问题