Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does Yeoman build without /styles/fonts?

Tags:

gruntjs

yeoman

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
            }
        }
    },
like image 919
Daniel Birowsky Popeski Avatar asked Aug 17 '13 15:08

Daniel Birowsky Popeski


1 Answers

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/*'
      ]
    }]
  }
}
like image 106
passy Avatar answered Oct 21 '22 00:10

passy