generator-angular-fullstack icon indicating copy to clipboard operation
generator-angular-fullstack copied to clipboard

Gulp build attempts to run client/index.html through Jade resulting in failure

Open jjongsma opened this issue 10 years ago • 7 comments

When using Jade as the template engine, the Gulp build processes index.html (mainView) with Jade, resulting in a syntax error and build failure. Removed .jade() from the pipeline allows the build to succeed.

jjongsma avatar Dec 23 '15 22:12 jjongsma

Simply removing the jade pipe doesn't work, anyone knows how to fix this?

wangjiaji avatar Feb 10 '16 16:02 wangjiaji

I manually fixed my project by commenting out the pipe to jade in the build:client task:

return gulp.src(paths.client.mainView) /* .pipe(plugins.jade({pretty: true})) comment out this line */ .pipe(plugins.useref())

I guess another option is to convert index.html to a jade file, which I tried but got into some issues with getting the generated index.html copied into the .tmp and dist folders, so I punted on that one.

drmikeh avatar Feb 22 '16 16:02 drmikeh

I tried much the same, but simply commenting out the line results in the build not containing the index.html though.

gazzwi86 avatar Feb 27 '16 13:02 gazzwi86

Ok, got some progress. Looks like a filter wasn't closed correctly. Removing .pipe(plugins.jade({pretty: true})) line and also adding after .pipe(assetsFilter) the following .pipe(assetsFilter.restore())

gazzwi86 avatar Feb 27 '16 13:02 gazzwi86

I have for the moment gone with removing the build revision numbers on image assets in the copy:images task

gazzwi86 avatar Feb 29 '16 22:02 gazzwi86

After removing jade step from index.html and adding the ".pipe(assetsFilter.restore())" there are still errors with the partials (navbar.html, footer.html, etc.) not getting added to Angular's templateCache.

drmikeh avatar Mar 01 '16 21:03 drmikeh

This should be fixed with https://github.com/angular-fullstack/generator-angular-fullstack/commit/687cd09fdd9a66b9230b865083288b79e246ca86

Awk34 avatar Mar 10 '16 01:03 Awk34