yeoman 在模板中打印代码字符

yeoman print code character in templates

当我使用 this.copyTpl yeoman 打印引号和非引号的代码章程复制模板时...这是我在做什么 在 index.js

this.dependencies["fontawesome"] = "4.2";
this.dependencies["jQuery"] = "~1.11.1";
this.dependencies["responsive-nav"] = "1.0.34";
this.dependencies["superfish"] = "1.7.5";

this.dep = JSON.stringify(this.dependencies); 

console.log(this.dep)
display 
{"fontawesome":"4.2","jQuery":"~1.11.1","responsive-nav":"1.0.34","superfish":"1.7.5"}

 this.fs.copyTpl(
            this.templatePath('_bower.json'),
            this.destinationPath(projectPath +'/bower.json'),{
                projectName: _.slugify(this.project_name),
                dependencies: this.dep
            }
        );

结果文件

{"fontawesome":"4.2","jQuery":"~1.11.1","responsive-nav":"1.0.34","superfish":"1.7.5"},

为什么会出现这种情况,我需要在哪里进行额外配置??我错过了什么??感谢帮助

<%= 转义传递给它的值以防止 XSS。

要输出原始输入,您需要使用 <%- 模板标签。

有关 Yeoman 在 http://ejs.co/

使用的模板引擎的完整文档