我有一个子项目,该子项目聚集在某个根项目下。
子项目定义了commands
,例如:
global $GlobalValue;
$GlobalValue = 0;
class SampleModuleController {
public function doSomething() {
global $GlobalValue;
$NewValue = 1;
$GlobalValue = $NewValue;
}
}
$ModuleController = new SampleModuleController();
$ModuleController->doSomething();
echo $GlobalValue; //print 1
通常,在我刚运行的sbt中,将命令定义为最高命令时
lazy val `sub` = project
...
.settings(
commands ++= Seq(Command.args("abc", ""){(state,args) =>
??? //edited
})
)
但是在模块上定义时,我无法执行此操作:
sbt> abc
如何在sbt> sub/abc
[error] Expected ':'
[error] Not a valid key: abc (similar: watch, doc)
[error] sub/abc
[error] ^
级运行abc
?