问答详情
源自:6-3 剖析Grunt - plugins(三)

grunt-buddha 在webapp 只有首行有注释 但在plugin test 中没问题 为什么呀

commentFilePath = path.join( __dirname, commentFilePathMap[who] ),
      commentContent = grunt.file.read(commentFilePath),
      lineCommentArr = commentContent.split(grunt.util.normalizelf('\n')),
      fileTestRexgMap = {
        'buddle': /o8888888o/
      }

提问者:艾珐 2015-09-14 10:10

个回答

  • RichardMiao
    2016-02-04 17:58:44

    buddha.js第40行: lineCommentArr = commentContent.split(grunt.util.normalizelf('\n'));

    改成: lineCommentArr = grunt.util.normalizelf(commentContent).split(grunt.util.normalizelf('\n'));

    就好了.