Yeoman Generator - utils is not defined

165 views Asked by At

I can't generate following file with this markup

<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>

Site_name should be overwritten with the appname.

I get following error:

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

When there is no placeholder it can generate this file with

this.template("html/carousel/_carousel.html", folderHTML + "carousel/" + this.appName + ".html", siteTitle);

Any Ideas?

0

There are 0 answers