【发布时间】:2013-12-11 09:46:41
【问题描述】:
我在没有引导程序的情况下安装了你的 webapp,然后在这个答案之后添加了引导程序 3:https://stackoverflow.com/a/19034513/712005。
我无法构建我的 main.css 并正确包含引导程序。 dist 文件夹中没有创建 style 文件夹。
运行“grunt build”时,我收到以下消息:
运行“cssmin:生成”(cssmin)
任务目标未写入,因为缩小的 CSS 为空。
但没有错误。
我的 gruntfile 包括这个:
useminPrepare: {
options: {
dest: '<%= yeoman.dist %>'
},
html: '<%= yeoman.app %>/index.html'
},
usemin: {
options: {
assetsDirs: ['<%= yeoman.dist %>']
},
html: ['<%= yeoman.dist %>/{,*/}*.html'],
css: ['<%= yeoman.dist %>/styles/{,*/}*.css']
}
还有这个:
grunt.loadNpmTasks('grunt-bower-install');
index.html 包括:
<!-- build:css(.tmp,app) styles/main.css -->
<!-- bower:css -->
<!-- endbower -->
<!-- endbuild -->
<!-- build:css(.tmp,app) styles/bootstrap.css -->
<!-- bower:css -->
<!-- endbower -->
<!-- endbuild -->
在构建过程中删除了我对 app 文件夹中 main.css 和 bootstrap.css 位置的引用。
bower.json 包括:
{
"name": "gabriel",
"version": "0.0.1",
"dependencies": {
"bootstrap": "~3.0.2",
"jquery": "~2.0.3",
"modernizr": "~2.7.0"
},
"devDependencies": {}
}
我错过了什么?
【问题讨论】:
标签: angularjs twitter-bootstrap-3 gruntjs yeoman grunt-usemin