dustinspecker / generator-ng-poly

Yeoman generator for modular AngularJS apps with Gulp and optional Polymer support
MIT License
237 stars 50 forks source link

Images Not Copied on --stage=prod #144

Open jboothe opened 9 years ago

jboothe commented 9 years ago

When running gulp --stage=prod the images and image folder do not get copied over to the build directory although terminal output shows images finishing:

[01:37:51] gulp-imagemin: Minified 29 images (saved 57.88 kB - 6%) [01:37:51] Finished 'images' after 5.04 s

I'm also getting the following error in the browser console: Error: [jqLite:onargs] jqLite#on() does not support theselectororeventDataparameters

Is there an issue with svg's? I also get a giant block of base64 output in the terminal during bowerCopy. Below is just an excerpt.

[01:37:52] Starting 'bowerCopy'...
angular-ui-grid/ui-grid.eot
angular-ui-grid/ui-grid.eot#iefix
angular-ui-grid/ui-grid.woff
angular-ui-grid/ui-grid.ttf?
angular-ui-grid/ui-grid.svg?#ui-grid
/c/dev/iCheer/Dashboard-201-Poly/bower_components/angularjs-toaster/toaster.cssdata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAs4c6QAAA ...
/c/dev/iCheer/Dashboard-201-Poly/bower_components/angularjs-toaster/toaster.cssdata:image/gif;base64,R0lGODlhIAAgAIQAAAQCBISGhMzKzERCROTm5CQHx...
/c/dev/iCheer/Dashboard-201-Poly/bower_components/ng-grid/ng-grid.cssdata:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYA...

A dev gulp build runs perfectly with no console errors. I'm using 0.8.3 with node 0.12.2.

And if I haven't mentioned it before, I've been using your gen since 10/2014 and loving it!!

jboothe commented 9 years ago

I've narrowed the image copy issue to the deleteTemplates task. I noticed you have '!' + config.buildImages in there twice. Deleting one of them still made no difference. It's ignoring your ignore statements. So for the time, I'm bypassing deleteTemplates and starting the build at copyTemplates.

I still trying to figure out the base64 garbage with angularjs-toaster/toaster.cssdata:image/png;base64.... Seems the bowerAssets task is choking on something in the bower_components/angularjs-toaster package. Is this just a poorly designed bower package?

I'm not familiar with how bower packages are processed by gulp so any insight / tips on how I might debug this is appreciated. Thanks.

dustinspecker commented 9 years ago

Oops at the base64 output. I have a console.log at https://github.com/dustinspecker/generator-ng-poly/blob/529c1f254dd6600c3e44c8b335aa03ca5f227671/app/templates/gulp/_build.js#L184 that can be removed.

Hmm. SVGs should get copied over. I'll try to do some experimenting with that soon.