grunt-concat separator option?

how to specify a separator in this scenario: I'm concatenating my files with grunt-concat this way: concat: { options: { banner: '<%= banner %>', separator: "" }, dist: { files:{ '<%= distdir %>/public/scripts/ieditor.js': [ 'public/scripts/ieditor/vars.js', 'public/scripts/ieditor/controllers/*.js', 'public/scripts/ieditor/directives/*.js', 'public/scripts/ieditor/app.js', 'public/scripts/ieditor/services/*.js', 'public/scripts/ieditor/filters/*.js' ], '<%= distdir %>/public/scripts/dashboard.js': [ 'public/scripts/dashboard/vars.js', 'public/scripts/dashboard/controllers/*.js', 'public/scripts/dashboard/directives/*.js', 'public/scripts/dashboard/app.js', 'public/scripts/dashboard/services/*.js', 'public/scripts/dashboard/filters/*.js' ] } } } what I want is to get a final result mapped to the original files like in compass when concatenating CSS files. Example: //####public/scripts/ieditor/vars.js############### content of public/scripts/ieditor/vars.js //####public/scripts/ieditor/controllers/a.js###### content of public/scripts/ieditor/controllers/a.js //####public/scripts/ieditor/controllers/b.js###### content of public/scripts/ieditor/controllers/b.js ..... So what's the name referring to the current file being concatenated so i can do something like this in the options area: options: { banner: '<%= banner %>', separator: "<%= current_file_name %>" }, Thanks in advance.

以上就是grunt-concat separator option?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏