Yeoman Generator - utils未定义

时间:2015-06-05 11:51:52

标签: generator yeoman

我无法使用此标记生成以下文件

<div class="animatedCarouselItems <%= site_name %>">
${utils.InlineStyleSheet.get("productions/<%= site_name %>/<%= site_name %>.css").raw()}
<div class="productionHomeStage">
    <img class="stageBg" src="@{'/public/images/productionhomestage/<%= site_name %>/<%= site_name %>_bg.jpg'}" alt="">
</div>

应使用appname覆盖Site_name。

我收到以下错误:

vents.js:72
    throw er; // Unhandled 'error' event
          ^
ReferenceError: utils is not defined
    at eval (eval at <anonymous> (/Users/sergejr/Documents/development/_projects/yeoman-generator/generator-copyDev/node_modules/yeoman-generator/node_modules/lodash/index.js:10747:16), <anonymous>:10:10)
    at underscore (/Users/sergejr/Documents/development/_projects/yeoman-generator/generator-copyDev/node_modules/yeoman-generator/lib/util/engines.js:23:45)
    at actions.engine (/Users/sergejr/Documents/development/_projects/yeoman-generator/generator-copyDev/node_modules/yeoman-generator/lib/actions/actions.js:224:32)
    at template (/Users/sergejr/Documents/development/_projects/yeoman-generator/generator-copyDev/node_modules/yeoman-generator/lib/actions/actions.js:198:19)
    at yeoman.generators.Base.extend.copyMainFiles (/Users/sergejr/Documents/development/_projects/yeoman-generator/generator-copyDev/generators/app/index.js:60:10)
    at /Users/sergejr/Documents/development/_projects/yeoman-generator/generator-copyDev/node_modules/yeoman-generator/lib/base

如果没有占位符,则可以使用

生成此文件
this.template("html/carousel/_carousel.html", folderHTML + "carousel/" + this.appName + ".html", siteTitle);

任何想法?

0 个答案:

没有答案