Build Grunt中子项目的全局模式
我有几个子项目要针对单个GrunFile运行,因为它们都需要针对它们运行相同的任务。例如,我需要在每个子项目中使用Compass编译Sass 这怎么可能使用Grunt呢?我尝试过全球化模式:Build Grunt中子项目的全局模式,build,glob,gruntjs,Build,Glob,Gruntjs,我有几个子项目要针对单个GrunFile运行,因为它们都需要针对它们运行相同的任务。例如,我需要在每个子项目中使用Compass编译Sass 这怎么可能使用Grunt呢?我尝试过全球化模式: compass: { options: { sassDir: './bundles/*/public/styles', cssDir: './bundles/*/temp/styles' } } 但我得到了以下错误: Running "compass" (compass) task
compass: {
options: {
sassDir: './bundles/*/public/styles',
cssDir: './bundles/*/temp/styles'
}
}
但我得到了以下错误:
Running "compass" (compass) task
Errno::ENOENT on line 441 of /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/pathname.rb: No such file or directory - /Users/Oliver/Development/Personal/Reader/bundles/*
Run with --trace to see the full backtrace
建议我不能以这种方式使用全局模式
这可能吗?如果可能,如何实现?答案如下:
Globbing模式在那里不起作用,因为从名称可以看出,它需要一个目录。但是,您可以为每个子项目创建单独的目标
这一点在报告中得到了回答:
Globbing模式在那里不起作用,因为从名称可以看出,它需要一个目录。但是,您可以为每个子项目创建单独的目标