Last active
December 17, 2015 06:57
-
-
Save LopatkinEvgeniy/0c1791b5596c8dc13b6b to your computer and use it in GitHub Desktop.
grunt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jshint node:true | |
module.exports = function (grunt) { | |
'use strict'; | |
grunt.loadNpmTasks('grunt-contrib-handlebars'); | |
grunt.initConfig({ | |
handlebars: { | |
options: { | |
amd: true, | |
namespace: false, | |
compilerOptions: { | |
// ограничение списка хелперов | |
knownHelpers: { | |
log: false, | |
lookup: false, | |
with: false, | |
blockHelperMissing: false, | |
helperMissing: false, | |
eq: true, | |
i18n_plural: true | |
}, | |
// если хэлпер не известен, то ошибка | |
knownHelpersOnly: true | |
} | |
}, | |
compile: { | |
files: [ | |
{ | |
expand: true, | |
flatten: false, | |
src: '**/*.hbs', | |
dest: 'public/templates/', | |
cwd: 'templates/', | |
rename: function (dest, path) { | |
return dest + path.replace(/\..+$/, '.js'); | |
}, | |
} | |
] | |
} | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment