yeoman / generator-webapp_DEPRECATED

Yeoman generator that scaffolds out a front-end web app
http://yeoman.io
974 stars 310 forks source link

Cannot grunt build app without running into errors #632

Closed georaldc closed 8 years ago

georaldc commented 8 years ago

Was testing this to build a simple site and after installing and running the generator (which ran fine without any errors), grunt build would abort, probably due to the following:

Running "useminPrepare:html" (useminPrepare) task
Warning: An error occurred while processing a template (Unexpected token )). Use --force to continue.
georaldc commented 8 years ago

Oh, I guess adding the --force flag makes it complete the build process, but it runs into another warning on the way:

Running "imagemin:dist" (imagemin) task
Warning: An error occurred while processing a template (Unexpected token )). Used --force, continuing.
stefanmeschke commented 8 years ago

I think the problem is that the useminPrepare:html task is done after cleaning the dist directory and there is no html file to prepare. Same problem on the imagemin:dist task: no images the error occured?

tsck commented 8 years ago

I believe the problem was that there were extra '%' characters added to the closing tags in the imagemin task.

Was:

cwd: '<%%= config.app %%>',
src: '*.{ico,png}',
dest: '<%%= config.dist %%>'

Fixed:

cwd: '<%%= config.app %>',
src: '*.{ico,png}',
dest: '<%%= config.dist %>'

I issued a pull request as per the above, just wanted to post it here for anyone having issues with this. Just delete those extra '%' characters and the build task should work.

RonanCodes commented 8 years ago

Brilliant, it's working now. The Yo Webapp setup still contains the error.

silvenon commented 8 years ago

Released in v1.1.2.