为什么Yeoman建造没有glyphicons? [英] Why does Yeoman build without glyphicons?

查看:157
本文介绍了为什么Yeoman建造没有glyphicons?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个 webapp 生成器,运行 grunt 后,我得到了一个正确显示字体的功能应用程序。但是,当我检查 dist / 目录时,我没有得到任何字体文件。

I'm working on a webapp generator and after running grunt I got a functional app which display fonts correctly. However, when I check in the dist/ directory I don't get any fonts files.

文档状态 grunt 命令构建部署应用程序,但 dist / 目录不是自主的。

The docs state that grunt command build the application for deployment, but the dist/ directory isn't autonomous.

我的副本:dist 任务如下:

dist: {
    files: [{
        expand: true,
        dot: true,
        cwd: '<%= yeoman.app %>',
        dest: '<%= yeoman.dist %>',
        src: [
            '*.{ico,png,txt}',
            '.htaccess',
            'images/{,*/}*.{webp,gif}',
            'styles/fonts/{,*/}*.*'
        ]
    }]
},

所以它复制字体,但不是在$ code> bower_components / sass-bootstrap / dist / fonts /

So it does copy font, but not the glyphicons one which is in bower_components/sass-bootstrap/dist/fonts/

她e是所有运行后我得到的 grunt build

Here is all I got after running grunt build

./dist
├── 404.html
├── favicon.ico
├── index.html
├── robots.txt
├── scripts
│   ├── coffee.js
│   ├── plugins.js
│   ├── vendor.js
│   └── main.js
└── styles
    └── main.css



问题



那么如何创建一个包含所有文件和资源的部署目录?

Question

So how do I create a deployment directory containing all files and resources ?

推荐答案

固定。您可以使用 generator-webapp > = 0.4.2启动一个新项目,或者应用此修补程序手动,其中只涉及一个新的行复制任务:

The bug Sindre mentioned has now been fixed. You can either start a new project with generator-webapp >= 0.4.2 or apply this patch manually, which only involves one new line to the copy task:

    copy: {
        dist: {
            files: [{
                expand: true,
                dot: true,
                cwd: '<%%= yeoman.app %>',
                dest: '<%%= yeoman.dist %>',
                src: [
                    '*.{ico,png,txt}',
                    '.htaccess',
                    'images/{,*/}*.{webp,gif}',
                    'styles/fonts/{,*/}*.*',
                    'bower_components/sass-bootstrap/fonts/*.*' // <-- New line
                ]
            }]
        }
    }

这篇关于为什么Yeoman建造没有glyphicons?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆