【发布时间】:2014-03-23 01:38:41
【问题描述】:
我对咕噜声有点困惑。首先,我爱上了这个工具,但是文档(或者可能只是我自己)对此并不是很聪明。
所以我有这样的事情:
coffee:
options:
sourceMap: true
files: [{
expand: true
cwd: '<%= yeoman.app %>/scripts'
src: '{,*/}*.coffee'
dest: '<%= yeoman.tmp %>/scripts'
ext: '.js'
}]
test:
files: [{
expand: true
cwd: '<%= yeoman.app %>/scripts'
src: '{,*/}*.coffee'
dest: '<%= yeoman.tmp %>/scripts'
ext: '.js'
}, {
expand: true
cwd: '<%= yeoman.test %>/spec'
src: '{,*/}*.coffee'
dest: '<%= yeoman.tmp %>/spec'
ext: '.js'
}]
我认为这在理论上应该在我的目标“dev”、“dist”和“test”之间有“共享”文件。
但据我了解,files 不应停留在选项下(为什么?)。
我也有这个:
compass:
all:
options:
sassDir: '<%= yeoman.app %>/styles'
cssDir: '<%= yeoman.tmp %>/styles'
generatedImagesDir: '<%= yeoman.tmp %>/images/generated'
imagesDir: '<%= yeoman.app %>/images'
javascriptsDir: '<%= yeoman.app %>/scripts'
fontsDir: '<%= yeoman.app %>/fonts'
importPath: [
'<%= yeoman.app %>/bower_components'
'<%= yeoman.app %>/styles'
]
httpImagesPath: '/images'
httpGeneratedImagesPath: '/images/generated'
httpFontsPath: '/fonts'
httpStylesheetsPath: '/styles'
httpJavascriptsPath: '/scripts'
relativeAssets: true
assetCacheBuster: false
bundleExec: true
raw: 'Sass::Script::Number.precision = 10\n'
dist:
options:
environment: 'production'
generatedImagesDir: '<%= yeoman.dist %>/images/generated'
但运行 grunt compass 运行 both grunt compass:all 和 grunt compass:dist 这是正常行为吗?
我肯定需要对此进行更好的解释。
【问题讨论】:
标签: coffeescript gruntjs