2015/03/13

[JavaScript][Grunt]grunt-contrib-jstのコンパイル時にエラー

昨日、grunt-contrib-jstを使ってtemplateをコンパイルする方法を書きました。

で下記のようなテンプレートがある場合、コンパイル時にエラーが発生しました。

<= HOGE >
調査したところ、下のように、interpolate : /\{\{(.+?)\}\}/gを削除したら無事にコンパイルできた。
'use strict';
 
module.exports = function (grunt) {
 
    grunt.initConfig({
        jst: {
          compile: {
            options: {
            },
            files: {
              "../templates.js": ["./*.html"]
            }
          }
        }
    });
    
    grunt.loadNpmTasks('grunt-contrib-jst');
    grunt.registerTask('build', ['jst']);
  
};

0 コメント:

コメントを投稿