New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need help on setup fontawesome or other fonts build stuff #71
Comments
The |
The |
Append {
"name": "webapp",
"private": true,
"dependencies": {
"bootstrap-sass": "twbs/bootstrap-sass#~3.1.0",
"modernizr": "~2.6.2",
"jquery": "~1.11.0",
"fontawesome": "~4.0.3"
},
"devDependencies": {},
"overrides": {
"fontawesome": {
"main": [
"css/font-awesome.css",
"fonts/fontawesome-webfont.eot",
"fonts/fontawesome-webfont.woff",
"fonts/fontawesome-webfont.ttf",
"fonts/fontawesome-webfont.svg"
]
}
}
} then run |
Actually, |
Hi @silvenon After reading through gulpfile.js, I added a line where fonts task locates:
Here I put all of my stuffs to assets directory instead of app directory. @kasperisager I have checked the fontawesome bower package, it has .bower.json under package root, maybe I can declare font assets in that file instead of override app bower.json? Thank you sooo much. |
It should work in development because it should get fonts from |
@silvenon My gulpfile.js is not different too much with the original one, I just add a line as I show above. I've checked again the fonts are loading through relative path so I don't need to copy the font to app directory, just like you said. |
Does it work then? |
Oh my god how did I not know about bower |
Yeah, I accidentally noticed it in wiredep's README 😃 |
@silvenon It's working now. I'm trying to integrate gulp with laravel, too. Gulp is indeed very nice. And yeoman too. ;) |
Hi all, I user my custom icon generated by fontastic. I followed @silvenon instructions and edit {
"name": "webapp",
"private": true,
"dependencies": {
"bootstrap-sass-official": "~3.1.1",
"modernizr": "~2.6.2",
"jquery": "~1.11.0"
},
"devDependencies": {},
"overrides": {
"icon": {
"main": [
"icon/styles.css",
"icon/fonts/pr360.eot",
"icon/fonts/pr360.woff",
"icon/fonts/pr360.ttf",
"icon/fonts/pr360.svg"
]
}
}
} Then I add icon folder into It works when I run |
@rizqinizamil that is not an appropriate use for bower. You should not be manually placing files in the "dependencies": {
"icon": "../your-icon-font/#~0.0.1",
} |
@austinpray I tried to add |
Place fonts in the Include the font CSS as a SCSS include in |
@austinpray It shows gulp.task('fonts', function () {
return $.bowerFiles()
.pipe($.filter('**/*.{eot,svg,ttf,woff}'))
.pipe($.flatten())
.pipe(gulp.dest('dist/fonts'))
.pipe($.size());
}); |
@rizqinizamil what are you even doing? Why are you changing the return statement? The return statement does not need to be changed, the original works fine for your purposes. |
@austinpray Sorry, but I still can't see my own icon in |
It solved by changing src directory directly |
compatibility with mainBowerFiles Example of related issue yeoman/generator-webapp#71
I'm trying to test this yo plugin on windows for optimizing front-end coding. At the moment everything is going smoothly except the fonts build (which using gulp-bower-files plugin). I don't know how to config this to get the fontawesome fonts copy to /dist/ directory.
Any suggestion and advice would be appreciated. Thank you.
The text was updated successfully, but these errors were encountered: