Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Build Grunt中子项目的全局模式_Build_Glob_Gruntjs - Fatal编程技术网

Build 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

我有几个子项目要针对单个GrunFile运行,因为它们都需要针对它们运行相同的任务。例如,我需要在每个子项目中使用Compass编译Sass

这怎么可能使用Grunt呢?我尝试过全球化模式:

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模式在那里不起作用,因为从名称可以看出,它需要一个目录。但是,您可以为每个子项目创建单独的目标