After running grunt build
I'm left with no fonts
directory inside dist/styles
.
What am I doing wrong?
Here's what I have in the Gruntfile.js
:
compass: { options: { sassDir: '<%= yeoman.app %>/styles', cssDir: '.tmp/styles', imagesDir: '<%= yeoman.app %>/../images', javascriptsDir: '<%= yeoman.app %>/scripts', fontsDir: '<%= yeoman.app %>/../styles/fonts', importPath: 'app/bower_components', relativeAssets: true, }, dist: { options: { imagesDir: '<%= yeoman.dist %>/images', fontsDir: '<%= yeoman.app %>/../styles/fonts' } }, server: { options: { debugInfo: true } } },
The compass
task isn't responsible for copying fonts over from app
to dist
. This is instead handled by the copy
task, which usually looks like this:
copy: {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: [
'*.{ico,png,txt}',
'.htaccess',
'bower_components/**/*',
'images/{,*/}*.{gif,webp}',
'styles/fonts/*' // <-- Where fonts are copied.
]
}, {
expand: true,
cwd: '.tmp/images',
dest: '<%= yeoman.dist %>/images',
src: [
'generated/*'
]
}]
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With