Gruntjs 为什么Yeoman构建时没有/样式/字体?
运行Gruntjs 为什么Yeoman构建时没有/样式/字体?,gruntjs,yeoman,Gruntjs,Yeoman,运行grunt build后,我在dist/style中没有font目录。 我做错了什么 以下是我在grunfile.js中看到的内容: 指南针:{ 选项:{ sassDir:“/styles”, cssDir:“.tmp/styles”, imagesDir:“/../images”, javascriptsDir:“/scripts”, fontsDir:“/../styles/fonts”, 导入路径:“应用程序/鲍尔_组件”, 对,, }, 地区:{ 选项:{ imagesDir:“/i
grunt build
后,我在dist/style
中没有font
目录。
我做错了什么
以下是我在grunfile.js中看到的内容:
指南针:{
选项:{
sassDir:“/styles”,
cssDir:“.tmp/styles”,
imagesDir:“/../images”,
javascriptsDir:“/scripts”,
fontsDir:“/../styles/fonts”,
导入路径:“应用程序/鲍尔_组件”,
对,,
},
地区:{
选项:{
imagesDir:“/images”,
fontsDir:“/../styles/fonts”
}
},
服务器:{
选项:{
debugInfo:true
}
}
},
compass
任务不负责将字体从app
复制到dist
。这由copy
任务处理,通常如下所示:
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/*'
]
}]
}
}
复制:{
地区:{
档案:[{
是的,
多特:没错,
cwd:“”,
目标:'',
src:[
“*.{ico,png,txt}”,
“.htaccess”,
“bower_组件/***”,
'images/{,*/}*{gif,webp}',
“styles/fonts/*”//不确定您的项目布局,但应该是dist
下的fontsDir
而不是yeoman.dist
?尝试过了,仍然没有字体目录。dist.options最初实际上是空的。这只是我,正在尝试使用stuff.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa最初没有设置有什么原因吗?大多数发电机都是开箱即用的。你用的是哪一个?奇怪的是,主干发电机。在找到这个解决方案之前,我不知道我做错了什么
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/*'
]
}]
}
}