Skip to content

Instantly share code, notes, and snippets.

@LopatkinEvgeniy
Last active December 17, 2015 06:57
Show Gist options
  • Save LopatkinEvgeniy/0c1791b5596c8dc13b6b to your computer and use it in GitHub Desktop.
Save LopatkinEvgeniy/0c1791b5596c8dc13b6b to your computer and use it in GitHub Desktop.
grunt
// 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