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

Not including font-awesome via bower

Open AntonyPritchett opened this issue 9 years ago • 3 comments

Hi there,

Thanks for an amazing generator... I have learnt a lot from your project.

I have tried to install 'font-awesome' via bower. It is all correctly in my 'bower_components' folder.

Problem is that I'm getting a not found error on the .woff2, .woff & .ttf files. GET http://localhost:3000/fonts/fontawesome-webfont.woff2?v=4.6.2

I tried adding them as overrides in bower.json, and now at least it copies the files into the dest directory on running gulp build, but I am still not able to use them in my dev environment (files don't show up in the .tmp directory or the path isn't being prefixed with bower_components.

Any assistance would be very much appreciated. (or what info I should pass on to the owner of the library)

AntonyPritchett avatar May 24 '16 23:05 AntonyPritchett

Hi Antony, i'm using font-awesome (4.6.3) in my project... all works for me with latest release of generator-gulp-angular (1.1.0) i'm using ONLY css, NO less and NO sass my bower.json overrides section:

"font-awesome": {
  "main": [
    "css/font-awesome.css",
    "fonts/*"
  ]
},

cyberdemon8 avatar May 25 '16 11:05 cyberdemon8

I'm having the same problem here. Any progress? Here's my gulp/build.js: ... .pipe($.replace('../../bower_components/bootstrap-sass/assets/fonts/bootstrap/', '../fonts/')) .pipe($.replace('../../bower_components/font-awesome/fonts', '../fonts')) ...

Bootstrap fonts are fine, but font-awesome are not copied to the dist/fonts dir

rotavio avatar Jul 20 '16 15:07 rotavio

@rotavio probably hacky, but this worked for me changing fonts task in build.js (saw it in https://github.com/Swiip/generator-gulp-angular/issues/849)

gulp.task('fonts', function () {
  return gulp.src('./bower_components/**/*.{eot,svg,ttf,woff,woff2}')
    .pipe($.flatten())
    .pipe(gulp.dest(path.join(conf.paths.dist, '/fonts/')));
});

timmyg avatar Aug 01 '16 20:08 timmyg