Grunt ~0.4.5
$ npm install grunt-triple-quotes --save-dev
grunt.loadNpmTasks('grunt-triple-quotes');
grunt.initConfig({
triple: {
replace: {
files: [{
cwd: '<%= opt.temp %>',
src: ['**/*.js', '!**/*-min.js'],
dest: '<%= opt.temp %>'
}]
}
}
});
$ grunt triple:replace
var tpl = '''
<h1>{{user.name}}</h1>
<p>{{user.text}}</p>
''';
will turn out to:
var tpl = '''\
<h1>{{user.name}}</h1>\
<p>{{user.text}}</p>\
''';